📄 vouchertypebean.java
字号:
/*$Id: VoucherTypeBean.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.List;import org.operamasks.example.ejb.gl.dao.OrmappingDaoBean;import org.operamasks.example.ejb.gl.entity.VoucherType;import org.operamasks.faces.annotation.Action;import org.operamasks.faces.annotation.Bind;import org.operamasks.faces.annotation.DataModel;import org.operamasks.faces.annotation.Format;import org.operamasks.faces.annotation.ManagedBean;import org.operamasks.faces.annotation.ManagedBeanScope;import org.operamasks.faces.annotation.ManagedProperty;import org.operamasks.faces.component.grid.impl.UIDataGrid;import org.operamasks.faces.component.layout.impl.UIWindow;@ManagedBean(name = "voucherTypeBean", scope = ManagedBeanScope.SESSION)public class VoucherTypeBean extends ResourceBinding { @Bind(id = "voucherType_grid", attribute = "binding") private UIDataGrid voucherType_grid_binding; @Bind(id = "voucherType_dialog", attribute = "binding") private UIWindow voucherType_dialog_binding; @ManagedProperty("#{ormappingDaoBean}") private OrmappingDaoBean dao; private boolean isModify = false; @DataModel(id = "voucherType_grid") private List<VoucherType> getVoucherType_gridValues() { return dao.getVoucherTypes(); } public boolean isModify() { return isModify; } @Format private String formatPretermit(boolean value) { return value ? this.messages.get("boolean_true") : this.messages .get("boolean_false"); } @Action public void grid_onrowselect() { } @Action(id = "voucherType_grid", event = "ondblclick") public void grid_ondblclick() { Object obj = voucherType_grid_binding.getSelectedRowData(); if (obj != null) { isModify = true; voucherType_dialog_binding.show(); } } @Action(id = "add") public void add() { isModify = false; voucherType_dialog_binding.show(); } @Action(id = "remove") public void remove() { Object obj = voucherType_grid_binding.getSelectedRowData(); if (obj != null) { dao.removeVoucherType((VoucherType) obj); voucherType_grid_binding.reload(); } } public UIDataGrid getVoucherType_grid_binding() { return voucherType_grid_binding; } public UIWindow getVoucherType_dialog_binding() { return voucherType_dialog_binding; } public OrmappingDaoBean getDao() { return dao; } public String getPretermitHeader() { return messages.get(ILocalStringsKey.PRETERMIT_HEADER_OUTPUTCOLUMN); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -