⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menuactionbean.java

📁 模拟简单的会计信息录入管理应用
💻 JAVA
字号:
 /*$Id: MenuActionBean.java,v 1.1 2008/07/15 03:36:41 liqi Exp $ *-------------------------------------- * Apusic (Kingdee Middleware) *--------------------------------------- * Copyright By Apusic ,All right Reserved * author   date   comment * wanx  2008-4-7  Created*/package org.operamasks.example.ejb.gl;import java.util.Map;import javax.faces.context.FacesContext;import org.operamasks.faces.annotation.Action;import org.operamasks.faces.annotation.Bind;import org.operamasks.faces.annotation.Inject;import org.operamasks.faces.annotation.LocalString;import org.operamasks.faces.annotation.ManagedBean;import org.operamasks.faces.annotation.ManagedBeanScope;/** * 该类通过使用useBean注入到index.xhtml文件中,作为控制菜单项的所有点击行为 *  * @author simba *  */@ManagedBean(name = "menuActionBean", scope = ManagedBeanScope.REQUEST)public class MenuActionBean {	@Bind(id = "menuAction", attribute = "script")	private String menuScript;	/**	 * 多语言资源注入	 */	@LocalString	private Map<String, String> messages;	@Inject	private FacesContext context;	/**	 * 新建期间标签	 */	@Action(id = "base_period")	private void click_period() {		setScript("period", "PeriodBean.panel_period.title");	}	/**	 * 新建科目标签	 */	@Action(id = "base_account")	private void click_accountd() {		setScript("account", "AccountBean.panel_account.title");	}	/**	 * 新建币别标签	 */	@Action(id = "base_currency")	private void click_currency() {		setScript("currency", "CurrencyBean.panel_currency.title");	}	/**	 * 新建人员标签	 */	@Action(id = "base_person")	private void click_person() {		setScript("person", "PersonBean.panel_person.title");	}	/**	 * 新建凭证类型标签	 */	@Action(id = "base_vouchertype")	private void click_voucherType() {		setScript("voucherType", "VoucherTypeBean.panel_vouchertype.title");	}	/**	 * 新建凭证标签	 */	@Action(id = "voucher")	private void click_voucher() {		setScript("voucher", "VoucherBean.panel_voucher.title");	}	/**	 * 新建帮助标签	 */	@Action(id = "help")	private void click_help() {		setScript("help", "HelpBean.panel_help.title");	}	/**	 * 新建科目余额表标签	 */	@Action(id = "report_accountbalance")	private void click_accountBalance() {		setScript("accountBalance",				"AccountBalanceBean.panel_accountbalance.title");	}	/**	 * 新建资产负债表标签	 */	@Action(id = "report_balancesheet")	private void click_balanceSheet() {		setScript("balanceSheet", "BalanceSheetBean.panel_balancesheet.title");	}	/**	 * 新建总分类帐标签	 */	@Action(id = "report_generalledger")	private void click_generalLedger() {		setScript("generalLedger",				"GeneralLedgerBean.panel_generalledger.title");	}	private void setScript(String pageName, String localString) {		String url = context.getExternalContext().getRequestContextPath()				+ "/center/" + pageName + ".faces";		menuScript = String.format("addTab('%s','%s','%s');", messages				.get(localString), url, pageName.toLowerCase());	}}

⌨️ 快捷键说明

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