您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 项目/工程管理 > compiere_erp_application_dictionary培训
AuthorPeterDate4/20/20049:22PMVersion0.1ApplicationDictionaryHowisawindowcreated?AWindownormallycontainsseveralTabs,andATabcontainsseveralFields.AndATabisbasedona‘Table’,soAFieldinatabisjusta‘Column’ina‘Table’.SOtheprocesstogenerateawindowisto:CreateatableintoOracle(OruseanexistingTable)CreateatableinApplicationDictionary(OruseanexistingTable)CreateColumnsinApplicationDictionaryforthisTableCreateAwindowinApplicationDictionaryCreateTabsforthiswindowusingatableinApplicationDictionaryCreatefieldsfortheTabCreateanewMenuitemandaddawindowmenuintothemenutreeLoginagain,ISTHATWHATYOUWANT?WhatisTableinApplicationDictionary?AtableinApplicationDictionarycanbephysicaltableoraviewinoracle.FieldsTabsTablesColumnsWindowDBTableName:thenameofphysicaltableorviewinOracle.View:clickifthisisaviewinOracle.DataAccessLevel:SystemOnlymeansitsdatacanonlybeaccessedbySystemClientClient/OrganizationmeansthedatacanbeaccessedbyClient(*)ororganization(GardenWorld,HQ)Organization:thedatacanonlybeaccessedbyorganization(GardenWorld,HQ)System/Client:thedatacanbeaccessedbySystemClientandClient(GardenWorld,*)Window:meanswhichwindowusesthistable.POWindow:Recorddeleteable:meanstheusercandeleterecordsinthetableHighvolume:thistablemaycontainshugerecords,sodisplaythesearchdialogfirstCreateColumnsfromDB:readthetable’sfieldsfromoracleandgeneraterelativecolumnsDBColumnName:thecolumnnameintherealtableorviewinOracleSystemElement:thisisusedindisplayinglikereportReference:thecolumn’sDataType,alsoitdecidewhatthefieldwilllooklikeinthewindowValidation:seeValidationRuleReferenceKey:seeReferenceDefaultLogic:setadefaultvalueforthiscolumn,ucanuseconstantvaluelike1,orthevalueinContextlike@AD_Client_ID@,orjustorsqlquerylike@SQL=select…..KeyColumn:somethinglikeprimarykeyParentlinkColumn:usedinMaster/Detailtabs,indicatedwithwhichcolumnthedetailtablinktheMasterTabMandatory:thecolumncannotbenull,otherwise,thesystemwillgiveanerrormessageUpdateable:thevalueofcolumncannotbeupdated,usavethevalueandthenthefieldbecomereadonlyReadOnlyLogic:Inwhichcase,thecolumnisreadonly,itshouldbeBooleanvaluelike1=2Callout:calloutisasmallpieceofjavacold,calledwhentheuserinitializethewindoworsomevalueisedited,forexample:there’re3fieldsinwindow,aprice,aquantity,andanamount,whenevertheuserchangethevalueofprice,orQuantity,theamountshouldbechangedautomatically.Thenuaddacalloutlikethat:privatestaticStringProductCode(Propertiesctx,intWindowNo,MTabmTab,MFieldmField,Objectvalue,ObjectoldValue){IntegerM_Product_ID=(Integer)value;if(M_Product_ID!=null)mTab.setValue(M_Product_ID2,M_Product_ID);return;}//ProductCodeSelectionColumn:meansthiscolumnisasearchkey,whenupushthesearch:thenitappendafterthenameanddescriptionAttention:The3columnwillbecomesearchkeyautomatically,Value,Name,DescriptionOK,thenthetableisFinished!Butbeforethat,umustcheckthese:Attention:1,atablemustcontainsuchcolumns:AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy2,allthecolumnnameiscaseSensitiveThengoestoTheWINDOWTheWindowistherealthingushoulddefinetoshowWindowType:Maintainmeansinthiswindowucancreaterecord,deleterecord,updaterecordQueryOnlymeansinthiswindowucanonlyviewthedata,nocreating,nodeleting,EtcTransaction:transactionisgenerallyusedinsomebusinesstransactionslikesalesorderorshipments,oftenithasacolumncalledProcessed,whenprocessed=’Y’thenthisrecordcannotbeeditedAndthetransactionwindowonlyshowthedatawhichprocessed=’N’andcreatedtoday,andafterupushthehistorybuttonintoolbar,thentheotherdatacanbedisplayedTable:whichtableisthetabused,(atabmustdependonatabledefinedintable)Sequence:thedisplaysequence,fromuptobottomTablevel:meanstherelationshipinmaster/detailtabsSinglerowlayout:thedatawilldisplayedassingleormultirowsbydefaultHasTree:thetabwillshowedwithatree,likethat:Attention:Itdoesnotmeanatreewilldisplayedautomaticallyifuclickthis,onlysometablehastree(M_Product,AD_Menu,C_BPartner,andmore),whichishardcodedOrderTab:ThisisanexampleofOrderTab:Process:ucandefineaprocessforthetab,itisnormallyusedforreportColumn:thetable’scolumn,afieldmustdependonacolumnFieldGroup:thisisafieldgroup:DisplayLogic:inwhichcasethefieldisdisplayed,ucanuseconstantvaluelike1,orthevalueinContextlike@AD_Client_ID@,orjustorsqlquerylike@SQL=select…..HeadingOnly:showthefield’snameonlyFieldOnly:showthefield’svalueonlyEverythingseemsOK,nowaddthewindowintotheMenu:Loginagain,toseewhathappened!
本文标题:compiere_erp_application_dictionary培训
链接地址:https://www.777doc.com/doc-6508 .html