内容发布更新时间 : 2024/11/17 1:51:51星期一 下面是文章的全部内容请认真阅读。
EntityViewInfo evi = new EntityViewInfo();
FilterInfo filterInfo = new FilterInfo(); //建立过滤条件 filterInfo.getFilterItems().add(
new FilterItemInfo(\ CompareType.EQUALS)); filterInfo.getFilterItems().add(
new FilterItemInfo(\ CompareType.EQUALS)); filterInfo.setMaskString(\ evi.setFilter(filterInfo);
if (mainQuery == null) {
mainQuery = new EntityViewInfo(); }
mainQuery.setFilter(filterInfo); //添加过滤条件 this.execQuery(); 100.界面之间传递参数
1. 收集父界面要传递给子界面的参数集
HashMap map = new HashMap();
map.put(\必须。被启动UI的父UI对象 map.put(\
map.put(\ map.put(\
map.put(\ IUIFactory uiFactory = null; uiFactory ); //以模态对话框方式启动 IUIWindow uiWindow = uiFactory
create(\被启动对象的类名称 */map); uiWindow.show();
2. 在子界面获取传递下来的数据 private void loadContext() {
int mode = ((Integer)this.getUIContext().get(\ AccountTableInfo
accountTableInfo
=
(AccountTableInfo)
this.getUIContext().get(\
CtrlUnitInfo cuInfo = (CtrlUnitInfo) this.getUIContext().get(\ AsstAccountInfo
asstAccountInfo
=
(AsstAccountInfo)
this.getUIContext().get(\
AuxAccountEditUI ui = (AuxAccountEditUI) this.getUIContext().get(\ }
101. 特别控件的初始化
=
UIFactory.createUIFactory\
1.使用枚举给ComboBox控件赋值 public void setReceiveType() {
this.kDComboBox2.removeAllItems(); List list = new List();
Iterator it = ReceiveType.iterator(); while (it.hasNext()) {
list.add(ReceiveType.getEnum(it.toString()).toString()); } } 方法一:
check.setSelectedIndex(1); //check 为下拉控件;
//setSelectedIndex(1) 是将下拉框选中第一个值
方法二:
check.setSelectedItem(ContractStateEnum.interim); //check 为下拉控件; // setSelectedItem(ContractStateEnum.interim) 是将下拉框选中值为interim枚举对象
2.使用值对象集合给ComboBox控件赋值 // 获取结算方式列表 IAsstActTypeDefault
AsstActTypeDefaultFactory.getRemoteInstance();
AsstActTypeDefaultCollectioni asstActTypeColl = iAsstActType
.getAsstActTypeDefaultCollection(\ AsstActTypeDefaultInfo defaultVal = null; int count = asstActTypeColl.size(); Object[] typeValue = new Object[count]; for (int i = 0; i < count; i++) {
AsstActTypeDefaultInfo asstActTypeColl.get(i);
if (value.isIsDefaultAccountPayable()) {
defaultVal = value; }
ObjectUuidPK pk = new
ObjectUuidPK(BOSUuid.read(value.getAsstActType().getString(\ AsstActTypeInfo asstInfo =
AsstActTypeFactory.getRemoteInstance().getAsstActTypeInfo(pk);
//cbi[i] = new ComBoxInfo(asstInfo, asstInfo.getName(), true); String typeName = asstInfo.getName(); String typeId = asstInfo.getId().toString();
String typeQueryName = asstInfo.getDefaultQueryName();
value
=
(AsstActTypeDefaultInfo)
iAsstActType
=
String typeTableName = asstInfo.getRealtionDataObject(); int csType = 0; //asstActTypeInfo.getCsType().getValue();
asstActType = new AsstActTypeUtils(typeName, typeId, typeTableName, typeQueryName, csType);
typeValue[i] = (Object) asstActType; }
///String strQueryName = \ this.kDComAccountCussentType.removeAllItems(); this.kDComAccountCussentType.addItems(typeValue); this.kDComAccountCussentType.setSelectedIndex(0); 102. /***关闭窗口*/
public boolean destroyWindow() { super.destoryWindow(); //做自己的一下销毁动作 } }
103. //如设置滚动条隐藏
this.getMainTable().setScrollStateVertical(KDTStyleConstants.SCROLL_STATE_HIDE);
104. 设置单元格的计算公式:
IRow row = null;
row = table.getRow(4);
row.getCell(5).setExpressions(\ row.getCell(6).setExpressions(\
104. listUI界面打开前进行过滤 在onLoad()调用 public void initFilter() {
String bcxyid = null;
if(EASRequest.attribute.get(\cxyid\
bcxyid = (String)EASRequest.attribute.get(\
EntityViewInfo evi = new EntityViewInfo();
FilterInfo filterInfo = new FilterInfo(); //建立过滤条件 filterInfo.getFilterItems().add(
new FilterItemInfo(\ CompareType.LIKE)); evi.setFilter(filterInfo);
if (mainQuery == null)
mainQuery = new EntityViewInfo(); mainQuery.setFilter(filterInfo); //添加过滤条件 this.execQuery(); }
105. 分录表格设置成单据F7,取值query中的值,解决长字符问题
KDTextField prmtBox = new KDTextField();
prmtBox.setEditable(true);
kdtE2.getColumn(\
String rowValue=null; String lwfbhtid=\
if(kdtE2.getRow(indexRow).getCell(\ { rowValue
kdtE2.getRow(indexRow).getCell(\ if(rowValue.length()>=33) { lwfbhtid=rowValue.substring(5,33);
kdtE2.getRow(indexRow).getCell(\
} }
106. 删除editdata 数据中分录行
SampleAuditEntryCollection saeColl = editData.getEntrys();
int size = saeColl.size(); for(int i = 0; i < size; i++) { saeColl.removeObject(0);
}
107. 关于组织f7集成问题
大家可通过以下方式进行集成 可不使用query方式集成组织f7 KDBizPromptBox promptDynQuery = new KDBizPromptBox(); promptDynQuery.setSelector(new AdminF7());
import com.kingdee.eas.basedata.org.client.f7.AdminF7; import com.kingdee.eas.basedata.org.client.f7.CompanyF7; import com.kingdee.eas.basedata.org.client.f7.CostCenterF7; import com.kingdee.eas.basedata.org.client.f7.CtrlF7; import com.kingdee.eas.basedata.org.client.f7.HROF7;
import com.kingdee.eas.basedata.org.client.f7.ProfitCenterF7;
=