wavemaker 在資料、畫面傳遞上使用variable 來設計相關函數,因此搞懂 variable 是對資料運用上相當重要的其架構如下
================================================
wm.Variable 父項目為 wm.Component
wm.Service父項目為 wm.Component
wm.JavaService 父項目為 wm.ServerComponent
wm.WebService"父項目為 wm.JavaService
wm.ServiceInput"父項目為 wm.Variable
wm.LiveVariable" 父項目為wm.ServiceVariable
wm.ServiceVariable 包含 [wm.Variable, wm.ServiceCall]
wm.JsonRpcService父項目為 wm.Service
wm.FunctionService"父項目 wm.Service
wm.NavigationService父項目為 wm.Service
==================================================
wm 提供多樣的javascript 結構基本上跟java 類似 所以要了解 wm 可由class 架構中取得
其中 wm.Object 提供所有物間之 源頭 ,wm.Component 提供基本connect 與plug-in 機制
以下為基本
==================================================
wm.Object:提供物件value 與 prop 的設定
toString() ==>return物件型態
getProp: function(inPropertyName) ==> 讀取屬性
setProp: function(inProp, inValue)
getValue: function(inName)
setValue: function(inName, inValue)
===================================================
wm.Component :提供 如dojo.connect 機制
connect()
connectOnce(sourceObj, sourceMethod, targetObj, targetMethod)
connectEvents (inObject, inEvents)
disconnectEvent(inEvent)
subscribe()
unsubscribe(subname)
valueChanged (inProp, inValue)
createComponent((inName, inType, inProps, inEvents, inChildren, inOwner)
makeEvents(inEvents, inComponent)
readComponents(inComponents)
startTimerWithName(timerName, componentName)
stopTimerWithName: function(timerName, componentName)
startTimer: function(timerName)
stopTimer: function(timerName, addToComponentLog)
subtractTimerWithName: function(timerName, componentName,time)
===============================================
wm.Service可執行姓並可拿到 result 的物件
getNamesList: function()
add: function(inService)
getNamesList: function()
forEach: function(inFunction)
clear: function()
getService: function(inName, hideFromClient)
onResult: function(inResult)
onError: function(inError)
getOperation: function(inOperation)
result
error
getOperationsList
==============================================
wm.Variable : 提供畫面中存取的關鍵
json
wmTypesChanged: function()
setType: function(inType, noNotify)
typeChanged: function(inType)
setJson: function(inJson)
hasList: function()
listDataProperties: function()
beginUpdate: function() ==> buffer 操作
endUpdate: function()
isUpdating: function()
clearData: function()
setData: function(inData)
getData: function()
getCount: function()
getItem: function(inIndex)
getItemData: function(inIndex)
setCursor: function(inCursor)
setNext: function()
setPrevious: function()
setFirst: function()
setLast: function()
addItem: function(inData, inIndex)
getItemIndex: function(inVariable)
dataChanged: function()
dataValueChanged: function(inProp, inValue)
valueChanged: function(inProp, inValue)
setDataSet: function(inDataSet)
lazyLoadData: function(inPropName, inVariable)
setLiveView: function(inLiveView)
getViewType: function()
getViewFields: function()
getViewListFields: function()
============================
待續----------
網頁
2011年9月3日 星期六
waveMaker- wm.base.Control
wm.base.Control 是處理wavemaker 中editor所有之 parent 物件
其包含[wm.Component, wm.Bounds],並且除一些如widith 、hight 之屬性
並且包含下列功能
addWidget( inWidget)
getParentBox()
updateBounds()
boundsResized()
padBorderMarginChanged()
isReflowEnabled()
setFlex(inFlex)
getScrollMargins()
listProperties()
adjustChildProps(inCtor, inProps)
removeWidget(inWidget)
setName (inName)
getUniqueName(inName)
updateId()
isAncestorHiddenLayer()
setDomNode(inDomNode)
loaded()
destroy()
postInit()
addUserClass(inClass, inNodeName)
其包含[wm.Component, wm.Bounds],並且除一些如widith 、hight 之屬性
並且包含下列功能
addWidget( inWidget)
getParentBox()
updateBounds()
boundsResized()
padBorderMarginChanged()
isReflowEnabled()
setFlex(inFlex)
getScrollMargins()
listProperties()
adjustChildProps(inCtor, inProps)
removeWidget(inWidget)
setName (inName)
getUniqueName(inName)
updateId()
isAncestorHiddenLayer()
setDomNode(inDomNode)
loaded()
destroy()
postInit()
addUserClass(inClass, inNodeName)
訂閱:
文章 (Atom)