




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
第一 UI工廠 概 UIF2技術架 設計思 設計目 MVC架 運行機 UIF2 結 小 第二 o 新建項 數據庫模 編寫接口 編寫upm 節點菜單職責運 小 第三 七巧板布 設計目 布局原 Xml界面布局總 七巧板常 七巧板布 絕對布 相對布 管理型界 列表型界 樹卡型界 單表界 主子表界 小 第四 Action活 按鈕配 Action類關系 按鈕初始 按鈕響 Action擴 按鈕分 節點級按 頁簽級按 視圖級按 第五 AppModel模 AppModel類層次結構 AppModel擴 第六 Editor視 Editor擴 第七 概 創建工 裝配 初始化數 ToftPanelAdaptor類圖結 ToftPanelAdaptor常 Xml常用配 小 第八 創建接口 Bean方式xml缺省值 活動xml依賴注入缺省值 Bean方式xml校驗 活動Xml依賴注入校驗 mediator機 原理解 QueryAction類 類 對外API與工具 小 第九 基于UIF2的應 項目準 新建項 數據庫模 實體設 模塊模塊初始 菜單 定義接 實現接 Upm Xml布局總 功能 菜單職責分 結果呈 擴展開 業務場 解決方 業務場 解決方 關閉校 業務場 解決方 業務場 解決方 必填項校 業務場 解決方 最終xml布局總 組裝xml布 定義樹 功能 菜單職責分 結果呈 擴展開 過濾組織 業務場 解決方 業務場 解決方 業務場 解決方 擴展開發后xml布局總 xml布局總 功能 菜單職責分 結果呈 擴展開 業務場 解決方 分頁查 業務場 解決方 擴展開發后xml布局總 小 第十 參照設 功能概 參照結構 參照分 參照設 NC模型和參照關 列表型參照Model設 樹型參照Model設 左樹右表型參照Model設 參照使 自定義參 重要類說 RefModle中的設 小 第十一 Temte預加載調用順 小 第十二 Xml配置與使 小 第十三 UAP運行與調 調試界 條件斷 變量斷 方法斷 改變變量 重新調 調 異常斷 UIF2運行與調 啟動項 加載UI界 加載 Action調 日志查 日志分 小 第一章UI工廠目前性質的公司對個性化要求也是越來越多那么通過配置可以快速解決客戶的各UIF2UIF2AppModel想象成應用的通訊總線,AppModel周圍的組件之AppModelAppModel中設置專門的屬性來傳遞信息Presnation)對象和展現對象即我們在屏幕上看到GUIAppModelDataManagerEditor,View,Action等現,而不關心具體的訂單或客商等業務對象的內部邏輯。把AppModel想象成應AppModelAppModel中轉。AppModel中設置專門的屬性來傳遞信息。SpringIoCMVCMVC架構是目前比較流行的一個開發模式,它強制性的使應用程序的輸入、處理和輸出分開。使用MVC應用程序被分成三個部件:模型、視圖、控制器。它們各自處理自UIF2MVC架構模式,AppModelM模型層,ViewEditorV視圖層,ActionCMVC工作。UAP開發出來的產品是個B/S架構模式的,主要使用了Spring,Swing,applet以及SOA技術。部署以后客戶通過IE瀏覽器來它是通過Applet技術內嵌Swing組件先把運行文件到客戶端的硬盤上,并在IE瀏覽器中運行會去服務器端此功能的類型的文件到客戶端,然后運行,實現按需,提高了性能。Applet運行過程機制如下圖。SwingAppletC/S開發方式,但部署是B/SC/S是胖客戶端,B/S是瘦客戶端,所以我們這種模式是介于胖客戶端UIF2 結Uif2的 Ui2nc.ui.uif2.tangramlayout.*包:uif2uif2中使用的七巧板布局等UIF2的技術架構和包結構,以及所設計的思路和要實現的目標,UAP開發的產品,在部署后的運行機制。下面建立一個ouif2來初步感受一下,使uap如何建立一個項目并運行起來。第二 o下面做個ouif2uif2的是如何運轉的,下面一步步來介紹如何創建并運行ouif2。新 ouif2項目,步驟如下數據庫模insertinsertintomd_module(createtime,creator, yname,dr,help,id,isactive,modifier,modifytime,name,parentmoduleid,resid,ts,versiontype)values('2012-10-0109:00:00''yonyou' ouif2平臺培訓''ouif2',ouif2','Y','yonyou','2012-10-01ouif2',null,null,'2012-10-0109:00:00',數據 模<?xmlversion="1.0"<module 檢查nchome中是否有 ouif2模塊(即 ouif2<?xmlversion="1.0"<module 編寫接口添加一 oUIF2類并實現 publicpublicoUIF2implements oUIF2publicStringo()//TODOAuto-generatedmethodreturn o}}upmupm <?xml<?xmlversion="1.0"<module <componentpriority="0"singleton="true"remote="false"tx="CMT"supportAlias="true"> 在項目 UI類,如下圖所示publicpublicUIFuncletpublicvoidinit(){ oNC=Stringmsg add(new}}節點需要先模塊,才能步驟,需要系統管理員登陸,然后[應用管理平臺>系統管理工具>功能,來打功能面,如下所示:以系統管理員登陸,然后[應用管理平臺]->[系統管理工具]->[菜單],來打開菜單注uap運 u1就有了運行ouif2菜單的權限了,然后以u1登錄后,通過[ouif2]->[ouif2]->[ouif2],就打開了ouif2的界面了,如下圖所經過上面的步驟,你成功的建立了一個o項目,對如何建立一個建立項目有個初步第三章七巧板布活的布局器TangramLayout。此布局器支持相對布局和絕對布局兩種布局方式。提供七巧板分為容器TangramContainer,布局TangramLayout,以及領域對象TangramLayoutModelUI層的MVCV視圖層了。Xml還有其他的配置元素)根據xml配置文件來分析,首先使用一個七巧板容器器中有兩個界面布局,一個是列表listView布局,如圖列表布局界面,另一個是卡片布局通過上面界面布局總裝圖N這些常量在lpanelTangramLayoutModel就是根據這些定義好的結構常量,來構造一棵節點組件樹,維持node節點對應的組件(Component)JSplitPaneJTabbedPane進行界面分割和控件布局。TangramLayoutModel數據樹結構圖在xml配置文件中在配置布是會使用一些TB,VS,HS,LEFT,RIGHT,UP,DOWN之表示一般組件,TBNode表示頁簽組件,HSNode表示橫向布局組件,VSNode表示縱向布局組LEFT、HSNodeLEFT,RIGHT來表示左右,如果表示的左中右,那么你在右中在分為左右,HSNodeJsplitPanel設置左右控件、22%,78%panel面板,VSNodeJsplitPane設置上下控30f。NC系列產品中一般是左側是樹結構,查詢條件,右側可能是VSNode是縱向布局,一般是上下布局,定義了兩個常量UP,DOWN來表示上下,如果是上中下你在下中在去分為NC系列產品中一般是UP是主組織選擇,Down是單據界面,TangramContainerTanggamLayoutagattaegy也稱為增量布局,通過界面元素的相對位置定義界面構成的布局方式。通過xmluif2應用實例中會進行詳細的講解。<?xml<?xmlversion="1.0"encoding="UTF-<!DOCTYPEbeansPUBLIC"-//SPRING//DTDBEAN//EN"<beanid="context"<bean 息--<beanid="boadatorfactory"<beanid="ManageAppModel"<propertyname="service"<propertyname="businessObjectAdapterFactory"<propertyname="context"<beanid="modelDataManager"<propertyname="model"<bean teContainer"init-<propertyname="context"<property界面元素<beanid="listView"class="nc.ui.uif2.editor.BillListView"init-<propertyname="model"<property<property<property<property <beanid="billFormEditor"<propertyname="model"<propertyname="nodekey"<propertyteContainer"<!--Actions##########################################--<beanid="saveAction"<propertyname="model"<propertyname="editor"<beanid="container"class="nc.ui.uif2.TangramContainer"init-<property<bean<property<bean <propertyname="namevalue="列表<propertyname="component"<bean <propertyname="namevalue="卡片<propertyname="component"<property<ref<?xml<?xmlversion="1.0"encoding="UTF-<!DOCTYPEbeansPUBLIC"-//SPRING//DTDBEAN//EN"<beanid="context"<bean 息--<beanid="boadatorfactory"<beanid="batchValidateSerice"<beanid="batchBillTableModel"<propertyname="service" <propertyname="businessObjectAdapterFactory"<propertyname="context"<beanid="modelDataManager"<propertyname="model"界面元素<beanid="componentValueManager"<beanid="list"class="nc.ui.uif2.editor.BatchBillTable"init-<propertyname="model"<propertyname="nodekey"<propertyname="componentValueManager"<!--Actions#########################################--<beanid="saveAction"<propertyname="model"<propertyname="editor"<propertyname="validationService"<beanid="container"class="nc.ui.uif2.TangramContainer"init-<property<bean <propertyname="component"<property<ref<?xmlversion="1.0"encoding="UTF-<!DOCTYPEbeansPUBLIC"-//SPRING//DTD <beanid="context"<beanid="HModelService"<beanid="ManageModelService" 息--<beanid="boadatorfactory"<beanid="treeCreateStrategy"<propertyname="factory"<beanid="HAppModel"<propertyname="service"<propertyname="treeCreateStrategy"<propertyname="businessObjectAdapterFactory"<propertyname="context"<beanid="ManageAppModel"<propertyname="service"<propertyname="businessObjectAdapterFactory"<propertyname="context"<beanid="modelDataManager"<propertyname="model"<beanid="ManageModelDataManager"<propertyname="model"<!--a)層次模型和管理模型之間的協調者,以Mediator結尾,不區分大小寫; <beanid="XXXMediator"<propertyname="treeModel"<propertyname="manageModel"<propertyname="manageModelMrg"<bean teContainer"init-<propertyname="context"<property界面元素 <beanid="treePanel" <propertyname="model"<property<ref<beanid="listView"class="nc.ui.uif2.editor.BillListView"init-<propertyname="model"<property<property<property<property <beanid="billFormEditor"class="nc.ui.uif2.editor.BillForm"<propertyname="model"<propertyname="nodekey"<property teContainer" <!--Actions#####################################--<beanid="treeAddAction"<propertyname="model"<beanid="saveAction"<propertyname="model"<propertyname="editor"<beanid="container"class="nc.ui.uif2.TangramContainer"init-<property<bean<property<bean <propertyname="namevalue="樹控件<propertyname="component"<property<bean<property<bean <propertyname="namevalue="列表<propertyname="component"<bean <propertyname="namevalue="卡片<propertyname="component"<property<ref<?xml<?xmlversion="1.0"encoding="UTF-<!DOCTYPEbeansPUBLIC"-//SPRING//DTDBEAN//EN"<beanid="context"<bean 息--<beanid="boadatorfactory"<beanid="treeCreateStrategy"<propertyname="factory"<beanid="HAppModel"<property<refbean="modelService"<property<refbean="treeCreateStrategy"<property<refbean="boadatorfactory"<property<refbean="context"<beanid="modelDataManager"<propertyname="model"<bean teContainer"init-<propertyname="context"<property界面元素<beanid="treePanel" <propertyname="model"<beanid="billFormEditor"class="nc.ui.uif2.editor.BillForm"<propertyname="model"<propertyname="nodekey"<property teContainer" <!--Actions################################--<beanid="saveAction"<propertyname="model"<propertyname="editor"<beanid="container"class="nc.ui.uif2.TangramContainer"init-<property<bean<property<bean <propertyname="component"<property<bean <propertyname="component"<property<ref<?xml<?xmlversion="1.0"encoding="UTF-<!DOCTYPEbeansPUBLIC"-//SPRING//DTDBEAN//EN"<beansdefault-lazy-<beanid="context"<bean TODO設置VO<propertyname="voClass"value="nc.vo.sp.sp001.PricetypeVO"<propertyname="serviceItf"value="nc.itf.pubapp.pub.smart.ISmartService"/> 息--<beanid="boadatorfactory"<beanid="batchValidateSerice"<propertyname="editor"<beanid="batchBillTableModel"<propertyname="context"<propertyname="service" <propertyname="businessObjectAdapterFactory"<propertyname="validationService"<beanid="modelDataManager" <propertyname="model"<propertyname="service" 界面元素<beanid="orgPanel"class="nc.ui.pubapp.uif2app.view.OrgPanel"<propertyname="model"ref="batchBillTableModel"<propertyname="dataManager"<beanid="list"<propertyname="model"<!--編 <bean<propertyname="model"<propertyclass="nc.ui.pubapp.uif2app.event.IAppEventHandler"/></bean>--<beanid="container"class="nc.ui.uif2.TangramContainer"<property<bean<property<bean <propertyname="component"<property<bean <propertyname="component"<propertyname="dividerLocation"<property<refbean="addAction"<refbean="editAction"<refbean="delAction"<property<refbean="addAction"<refbean="delAction"<refbean="separatorAction"<refbean="saveAction"<refbean="separatorAction"<refbean="cancelAction"<propertyname="model"<!--Actions########################################--<beanid="queryAction"<propertyname="model"<propertyname="dataManager"ref="modelDataManager"<beanid="addAction"<propertyname="model"TODO修改VO<propertyname="voClassName"<beanid="editAction"<propertyname="model"<beanid="delAction"<propertyname="model"<beanid="saveAction"<propertyname="model"<propertyname="editor"<beanid="cancelAction"<propertyname="model"<propertyname="editor"<bean ode.ui.action.SeparatorAction"<?xml<?xmlversion="1.0"encoding="UTF-<beansxmlns="""<beanid="context"class="nc.vo.uif2.LoginContext"<beanid="ManageModelService"<propertyname="billMaintainService"value="nc.itf.pubapp.pub.smart.IBillMaintainService"/> 接口分開是為了區別事務類型,沒有默認實現,需要定義自己的接口繼承此接口,并配置到upm文件中<propertyname="billQueryService"value="nc.itf.pubapp.pub.smart.IBillQueryService"/> 息--<beanctory"/><beanid="ManageAppModel"<propertyname="service"<propertyname="businessObjectAdapterFactory"<propertyname="context"<beanid="modelDataManager"<propertyname="model"<propertyname="service"<bean <propertyname="context"ref="context"界面元素<beanid="listView"<propertyname="model"<property <beanid="billFormEditor"<propertyname="model"<property teContainer" teContainer"<propertyname="autoAddLine"value="false"<property簡單的根據一個字段是否為空的空行過濾器,因為多數情況下都是判斷存貨是否為空來過濾空行--><propertyname="fieldName"value="xxxx" ,與表體右鍵菜單保持一致--<property<bean<bean ineAction" <propertyname="listView"ref="listView"<property ponent"ref="billFormEditor"<!--打開節 <bean <propertyname="model"VO<propertyname="voClassName"<property ponent"<property<entrykey="101" 自動修正卡片界面的分數顯示控件(換算率<bean<constructor-arg,則可不配<property<bean <propertyname="model"<propertyname="saveAction"<!--<bean<propertyname="model"<property</bean>--<beanid="container"class="nc.ui.uif2.TangramContainer"<propertyname="model"<property<bean<property<bean <propertyname="namevalue="列表<propertyname="component"ref="listView"<bean <propertyname="namevalue="卡片<propertyname="component"ref="billFormEditor"此處配置的Action<property<refbean="addAction"<refbean="editAction"<refbean="deleteAction"<refbean="separatorAction"<ref<refbean="previewAction"<refbean="printAction"此處配置的Action<property<refbean="saveAction"<refbean="cancelAction"此bean不是必須的,用于配置視圖級按鈕,如果沒有各個界面按鈕的差異,可以將<beanid="toftpanelActionContributors"<property<refbean="actionsOfList"<refbean="actionsOfCard"</bean>--<beanid="actionsOfList"<constructor-argref="listView"<property<refbean="addAction"<refbean="editAction"<refbean="deleteAction"<refbean="cancelAction"</bean>--<beanid="actionsOfCard"<constructor-argref="billFormEditor"<property<refbean="addAction"<refbean="editAction"<refbean="deleteAction"<refbean="saveAction"<refbean="cancelAction"<refbean="previewAction"<refbean="printAction"</bean>--<bean ode.ui.action.SeparatorAction"<beanid="queryAction"<propertyname="model"ref="ManageAppModel"<propertyname="dataManager"ref="modelDataManager"<property <property ponent"ref="listView"<beanid="addAction"<propertyname="model"ref="ManageAppModel"<property <property <property ponent"<beanid="editAction"<propertyname="model"ref="ManageAppModel"<property <property ponent"ref="billFormEditor"<beanid="deleteAction"<propertyname="model"ref="ManageAppModel"<beanid="saveAction"<propertyname="model"ref="ManageAppModel"<propertyname="editor"ref="billFormEditor"<property <propertyname="billForm"<beanid="cancelAction"<property<propertyname="model"ref="ManageAppModel"<beanid="previewAction"<!--<beanid="previewAction"<propertyname="preview"value="true"<propertyname="model"ref="ManageAppModel"<beanid="printAction"<!--<beanid="printAction"<propertyname="preview"value="false"<propertyname="model"ref="ManageAppModel"SpringSpring有了了解才能很好的做七巧板布局,同時七Spring的知識,請參閱相關書第四章Action活在UIf2里的一個action對應界面上的一個按鈕,UIF2工廠提供了一套增、刪、改、cti里atitn及tttnacti之間的聯系由acti即可,tiactinpubappactionactionactionxml<!--Actions<!--Actions####################################--<bean ode.ui.action.SeparatorAction"<beanid="addAction"<propertyname="model"ref="ManageAppModel"<property<property<property ponent"<beanid="editAction"<propertyname="model"ref="ManageAppModel"<property<property ponent"ref="billFormEditor"<beanid="deleteAction"<propertyname="model"ref="ManageAppModel"<beanid="saveAction"<propertyname="model"ref="ManageAppModel"<propertyname="editor"ref="billFormEditor"<beanid="cancelAction"<propertyname="model"ref="ManageAppModel"<beanid="queryAction"<propertyname="model"ref="ManageAppModel"<propertyname="dataManager"ref="modelDataManager"<propertyname="qryCondDLGInitializer"<property ponent"ref="listView"<property teContainer" 的源碼是publicclasspublicclassSaveActionextendsNCAction{privatestaticfinallongserialVersionUID=1L; AppModelmodel;privateIEditorpublicSaveAction()}IValidationServicepublicvoiddoAction(ActionEvente)throwsException{Objectvalue=editor.getValue();}elseif(model.getUiState()==UIState.EDIT){}}protectedvoiddoEditSave(Objectvalue)throwsException{}protectedvoiddoAddSave(Objectvalue)throwsException{ObjectreturnObj=model.add(value);if(modelinstanceofHierachicalDataAppModel)}protectedvoidshowSuccessInfo()cessInfo(),getModel().getContext());}@paramprotectedvoidvalidate(Objectvalue){{try}catch(ValidationExceptione)thrownew }}}protectedbooleanisActionEnable(){} publicvoidthis.model=AppModelmodel)}publicvoidsetEditor(IEditoreditor)this.editor=}publicIValidationServicegetValidationService()return}publicvoidsetValidationService(IValidationServicevalidationService){this.validationService=} AppModelgetModel()return}publicIEditorgetEditor()return}}Action如上面的action配置,在xmltoftpanelActionContributorsconnectActionContributor方Actionappmodel進actionmodel的狀態的變化而變化,如下圖所示。actionmodel之間的關系就是觀察者模式的一種界面和數據的關系。ActionAction都繼承了接口AppEventListener,如下圖所示,那么model繼承UIAppModelactionmodelActionpublicpublicclassAddActionExtextendsnc.ui.uif2.actions.AddActionpublicvoiddoAction(ActionEvente)throwsException//TODOAuto-generatedmethod}protectedbooleanisActionEnable()//TODOAuto-generatedmethodreturn}}<bean<beanid="addAction"<propertyname="model"ref="ManageAppModel"鈕,類似于全局級的按鈕,界面如圖,,ActionxmltoftpanelActionContributors用途了,xml配置如下圖所示。XML
constructor:action對應的頁簽控件2.modelmodel3.actions:action4.editActionsactionconstructor:action對應的頁簽控件2.modelmodel3.actions:action4.editActionsaction導航按鈕,界面如圖,xml如圖。第五章AppModel模包存放的是AppModelAppModel周圍的組件之間不互得到前臺的數據。Uif2BillManageModelBatchBillTableModel,同時可pubapp就對此進行擴展。AppModelUIAppModel是抽象UI應用模型類,從前面介紹的MVC架構來看屬于模型層,一般稱之為應用模型前臺需要的數據全在這里的,UIF2提供的 UIAppModel的繼承類是單據管理模型BillManageModel。這個類需要在xml配置文件中配置,xml如上面MODEL_INITIALIZED,SELECTION_CHANGEDUISTATE_CHANGEDBillManageModelDATA_DELETED、SELECTED_DATE_CHANGED等BillManageModelDATA_DELETED、DATA_INSERTED等AppModelModelui2BillManageModel,不能滿足要求的話,可以進行擴展,例如pubapp就對此就行了擴展,pubapp中的nc.ui.pubapp.uif2app.model.BillManageModel源碼是:publicpublicclassBillManageModelextendsPFBillManageModelIAppModelExprivateAppModelExDelegateappModelExDelegate=privateboolean 需要調用此方法之外,其他的 extendsAppEvent>eventType,IAppEventHandler@see#addAppEventListener(Class,publicvoidaddAppEventListener(AppEventListenerl)}publicvoidaddAppEventListener(Class<?extendsAppEvent>IAppEventHandler<?extendsAppEvent>l)}public<TextendsEventListener>T[]getAppEventListener(Class<T>listenerClazz){}@deprecated{@linkpublicvoidfireEvent(AppEventevent)}publicAppUiStategetAppUiState()return}@seepublicUIStategetUiState()return}publicbooleanisSupportLazilyLoad()return}publicvoidremoveAppEventListener(AppEventListenerl)}publicvoidremoveAppEventListener(Class<?extendsAppEvent>IAppEventHandler<?extendsAppEvent>l)}publicvoidsetAppUiState(AppUiStateappUiState)}publicvoidsetSelectedOperaRows(int[]selectedRows)for(introw:selectedRows)if(this.supportLazilyLoad)}}}(non-@seepublicvoidsetSelectedRow(intselectedRow)if(this.supportLazilyLoad)}}@parampublicvoidsetSupportLazilyLoad(booleansupportLazilyLoad)this.supportLazilyLoad=}@seepublicvoidsetUiState(UIStateuiState)}@param@throwsprotectedvoiddbDeleteMultiRows(Object...deletedObjects)Exceptionfor(ObjectdeletedObject:deletedObjects)}}}}<beanid="ManageAppModel"<beanid="ManageAppModel"<propertyname="service"<propertyname="businessObjectAdapterFactory"<propertyname="context"第六章Editor視uif2BillFormBillListView類卡片視圖(VO的上卡片下列表形式)為Uif2下的單據卡片的界面、里面維持一個model領域模型、并此模型的動作、BillCardPanelpanel、單據界面一般具有操作性、增、刪、改操作BillForm數據的列表展現利用單據模板的列表視圖(BillListPanel)進行展現,即支持單表頭也BillManageModel配合使用為Uif2下的單據列表的界面、里面維持一個model領域模型、并此模型的動作、BillListView支持批量操作的列表編輯器,支持數據的展現和編輯利用單據模板的卡片視圖模板實現對BatchBillTableModel模型數據的展現及的響應,與BatchEditAction、BatchAddLineAction、BatchDelLineAction等動作配合使用EditorpublicclassShowUpableBillListViewextendsBillListViewponent, ponentpublicclassShowUpableBillListViewextendsBillListViewponent, ponentprivatestaticfinallongserialVersionUID=booleanisFromSelf=privatenewponentprivateboolean pnonetDelegate= publicvoidadd ponentListenerl){ }publicbooleancanBeHidden()return }publicvoidhandleEvent(AppEventevent)if((AppEventConst.DATA_UPDATED==||AppEventConst.DATA_DELETED==||AppEventConst.DATA_INSERTED==event.getType()||AppEventConst.SELECTED_DATE_CHANGED==event.getType()) ponentVisible())this.isLazyRefresh=}}public ponentVisible() }publicvoidsetAutoShowUpEventListener(IAutoShowUpEventListenerl){}public ponentVisible(booleanvisible)if(this.isLazyRefresh&&visible)this.isLazyRefresh=false;}booleanoldVisible if(oldVisible!=visible)this.firePropertyChange("componentVisible",oldVisible,}}publicvoidshowMeUp()在轉單后數據處理界面,返回按鈕在編輯態也是可見的,所以在返回切會列表界面if(this.getModel()!=&&this.getModel().getUiState()!=UIState.NOT_EDIT)}}protectedvoidhandleSelectionChanged()if(this.isFromSelf)}if(this.isLazyRefresh)this.isFromSelf=true;this.isFromSelf=false;}else}}protectedvoidsetHeadTableHighLightByModelSelection()if(!this.isLazyRefresh)}}}<beanid="listView"<beanid="listView"<propertyname="model"<property 第七章界面組裝技ToftPanelAdaptorUIF2BeanFactory,Action、AppModel、Editor視圖以及各種組件等。ToftPanelAdaptor在nc.ui.uif2包中,UIF2BeanFactory使用了UIToftPanelAdaptor來解析裝配成界面,它文件,然后來展示層UI界面,基類面板適配器是功能的類,下面講解xml配置原理,如果不是利用Spring配置技術配置的界面,例些界面通過xml配置文件配置不出變量、數據模型、模板、容器、控制器等,它們在xmlNc定義好的常量,這些常量contextbean,如果你定義為別的字段名稱,它就找不到,下面會境界這些配置以及對應的基類面板適配器加載機制如下圖所示,首先根據功能中配置xml路徑UIF2BeanFactoryxmlbean到工廠中,三是加載用戶進行的客戶化開發的插件配置文件,創建工廠的createFactory()源碼如下:UIF2工廠和初始化登錄上下文之后,就是構建界面了,主要做如下一Container之前會預先加載的預處理器,方便實現插件機xmlidpreprocessorbeanpanel裝配UassembleUI()初始化,方法是initData(,另一種是初始化model來進行數據初始化,方法是uif2應用中的列表卡片初始化數據。modelxmlUIF2ListBillModelDataManager,它IAppModelDataManagerEx接口。 ToftPanelAdaptorToftPanelAdaptormodelDataManager,下面分別講解這些重要的常量配置。的就不了,配置如上面的功能在xml配置的調用,配置如上面的配置文xmlbeanxmlbar載時會去xml中查找后綴為mediator的bean來加載,配置如上面的配置 xmlxmlXmlxmlxmlidcontext,配置例子如下:xmlmodelDataManager,配置圖如下:容器來裝載,xml配置例子如下:
校驗,可以將temteNotNullValidate屬性設置為false。actionactionviewappmodel來Uapaction,一般按鈕有新增、修改、保存、刪除等,所以對應的都有相應的活動actionAddAction、EditAction、SaveAction、DeleteAction等,以他們活動分別配置如下:
總組合的id是toftpanelActionContributors,在基類面板是配置會加載這個活動組合
列表和卡
活動器配
UIF2ToftPanelAdaptor類,這是面板,本章講解了它是如何構建界面,以及在組裝界面中必須使用的常量,因為面板是根據UIF2中其他的公共機制。第八章其他公共機創建一個類并繼承IDefaultValueProvidergetDefaultValue()中填寫初始化的業務,同時一個屬性ModelDataManager以便在xml配置的時候依賴注入數據模型類model,Bean方式xml缺省值xmlBean方式xml校驗Xmlmediator機載時會去xml中查找后綴為mediator的bean來加載,配置如上面的配置已提供的路徑:nc.ui.pubapp.uif2app.event包;對于有返回值的Event必須設置其返回值,不能為空;類型有:卡片列表各種編輯、組織改變、新增、排序、頁簽切換、行改變、合計等。配置示例如圖配Uif2nc.ui.uif2.actions.QueryActionxmlIqueryAndRefreshManagerEx接口的類作為初始化數據的數據BUIncluedGlobleAndGroupQueryDelegatornc.ui.uif2.editor.QueryTemteContainer如下圖的配置:QueryActionmodelDataManager數據模型管理器需要實現IqueryAndRefreshManagerEx接口(查詢刷新操作接口的擴展initModelBySqlWhere(IQuerySchemeqryScheme、sqlmodel、然后通知界面加載查詢出來的數據. API nc.ui.uif2.actions.QueryAction:查詢nc.ui.uif2.editor.QueryTemteContainer:查詢模板裝載容nc.ui.uif2.actions.DefaultQueryDelegator:默認的查詢條件獲取UIF2中其他通用的機制,例如按鈕機制,有哪些按鈕,這些按鈕是如何配置UIF2中典型的元素。第九章基于UIF2的應uif中如何實現卡片界面、列表界面、樹管理、以及負責的界pubapp 數據庫模insertintomd_module(createtime,creator, yname,dr,help,id,isactive,modifier,modifytime,name,parentmoduleid,resid,ts,versiontype)values('2012-10-0109:00:00'yonyou''uif2'平臺培訓'uif2','uif2','Y','yonyou','2012-10-0109:00:00','uif2',null,null,'2012-10-0109:00:00',0);quotation.bmf9.1點擊右上角的MDP實體設計器,或者從中找到也可以9.2MDP瀏覽視圖quotation.bmf9.3以系統管理員登陸后,通過[應用管理平臺]->[系統管理工具]->[功能],打開功能界面,首先需要的是添加一級模塊和二級模塊 UF10uif2統管理員登陸后,通過[應用管理平臺]->[系統管理工具]->[菜單],步驟如下:true表示:對菜單進行分類,用戶無法點擊來打開一個頁面;如果是false:表示:需要關聯功能,用戶點擊后打開一個頁面。uf10,同時勾public中定義兩個接口,一個是管理接口IUIF2MngService,它繼承了nc.itf.pubapp.pub.smart.IBillMaintainService,另一個是查詢接口們都在public下面的nc.itf.uif2.bill中,它們都是繼承了pubapp中提供的接口,如importpublicimportpublicinterfaceIUIF2MngServiceextends }importimportpublicinterfaceIUIF2QryServicveextendsIBillQueryService}源碼解析:IUIF2QryServicve繼承的接口IBillQueryService是實現查詢的,用戶可以上面定義好兩個接口后,就需要實現這兩個接口,接口實現類一般放在pirvate中,UIF2MngServiceImpl實現了IUIF2MngService接口,UIF2QryServicveImpl實現了IUIF2QryServicve接口。nc.impl.uif2.bill包中。如下圖所示:importimportimportimportnc.md.persist.framework.IMDPersistenceQueryService;importnc.md.persist.framework.IMDPersistenceService;importnc.md.persist.framework.MDPersistenceS
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2022年圣誕節酒店宣傳方案范文(9篇)
- 一般施工方案
- 路燈節能改造工程規劃設計方案(參考范文)
- 跨境金融保障措施實施方案
- 精神衛生中心建設項目可行性研究報告(參考模板)
- 供水管道換新改造項目實施方案(模板)
- 湖北經濟學院《微機保護及其測試技術》2023-2024學年第二學期期末試卷
- 遼寧職業學院《隨機信號分析》2023-2024學年第二學期期末試卷
- 廣州幼兒師范高等專科學校《新媒體編輯》2023-2024學年第二學期期末試卷
- 杭州醫學院《微機與微控制器原理》2023-2024學年第二學期期末試卷
- 青海省魚卡礦區魚卡二號井礦山地質環境保護與土地復墾方案
- 提高大面積混凝土地面表面平整度課件
- 活動板房材料規格表大全
- 臺區線損綜合分析臺區線損分類及計算方法
- 城市園林綠化養護方案
- 人民幣收藏培訓知識
- 籍貫對照表完整版
- 中興基站設備故障處理指導書
- 公路工程地質試卷A
- 渤海大學在線自助繳費平臺操作流程
- 2023年山東省大學生朋輩心理輔導技能大賽筆試題庫
評論
0/150
提交評論