@@ -33,7 +33,7 @@ dojo.setObject("TreeView.widget.Commons", (function() {
3333
3434
3535 function getEnumMap ( classname , attrname ) {
36- var meta = mx . metadata . getMetaEntity ( classname ) ;
36+ var meta = mx . meta . getEntity ( classname ) ;
3737
3838 if ( getAttributeType ( classname , attrname ) != 'Enum' )
3939 throw "Not an enumeration: " + args . join ( "." ) ;
@@ -73,11 +73,11 @@ dojo.setObject("TreeView.widget.Commons", (function() {
7373 return getAttributeType ( parts [ 1 ] , parts [ 2 ] )
7474
7575 if ( attr . indexOf ( "/" ) == - 1 ) {
76- if ( classnameOrObject . getClass )
77- classnameOrObject = classnameOrObject . getClass ( ) ;
76+ if ( classnameOrObject . getEntity )
77+ classnameOrObject = classnameOrObject . getEntity ( ) ;
7878
79- var meta = mx . metadata . getMetaEntity ( classnameOrObject ) ;
80- return meta . getAttributeClass ( attr ) ;
79+ var meta = mx . meta . getEntity ( classnameOrObject ) ;
80+ return meta . getAttributeType ( attr ) ;
8181 }
8282
8383 return false ;
@@ -91,7 +91,7 @@ dojo.setObject("TreeView.widget.Commons", (function() {
9191 if ( attr . indexOf ( "/" ) == - 1 ) {
9292 if ( renderValue )
9393 return mx . parser && mx . parser . formatAttribute ? mx . parser . formatAttribute ( object , attr ) : mxui . html . renderValue ( object , attr ) ; //mxui.html.rendervalue moved in 5.~7.
94- return object . getAttribute ( attr ) ;
94+ return object . get ( attr ) ;
9595 }
9696 var parts = attr . split ( "/" ) ;
9797 if ( parts . length == 3 ) {
@@ -110,7 +110,7 @@ dojo.setObject("TreeView.widget.Commons", (function() {
110110 else {
111111 //..but, there is a guid...
112112 var tmp = null ;
113- mx . processor . get ( { guid : child , noCache : false , callback : function ( obj ) { //async = false option would be nice!
113+ mx . data . get ( { guid : child , noCache : false , callback : function ( obj ) { //async = false option would be nice!
114114 tmp = obj ;
115115 } } ) ;
116116 if ( tmp != null ) //callback was invoked in sync :)
@@ -125,7 +125,7 @@ dojo.setObject("TreeView.widget.Commons", (function() {
125125
126126 //objects can be returned in X different ways, sometime just a guid, sometimes its an object...
127127 if ( parts . length == 2 ) {
128- var result = object . getAttribute ( parts [ 0 ] ) ; //incase of of a get object, return the GUIDs (but sometimes getAttribute gives the object...)
128+ var result = object . get ( parts [ 0 ] ) ; //incase of of a get object, return the Guids (but sometimes getAttribute gives the object...)
129129 if ( ! result )
130130 return "" ;
131131 if ( result . guid )
@@ -143,8 +143,8 @@ dojo.setObject("TreeView.widget.Commons", (function() {
143143 return null ;
144144 if ( thing . guid )
145145 return thing . guid ;
146- if ( thing . getGUID )
147- return thing . getGUID ( ) ;
146+ if ( thing . getGuid )
147+ return thing . getGuid ( ) ;
148148 if ( / ^ \d + $ / . test ( thing ) )
149149 return thing ;
150150 throw "Does not look like a MxObject: " + thing ;
@@ -236,7 +236,7 @@ dojo.setObject("TreeView.widget.Commons", (function() {
236236 if ( res === false ) //set returns undefined if ok, or false on failure
237237 throw "Commons.store: Unable to update attribute: " + attr ;
238238
239- mx . processor [ commit === true ? 'commit' : 'save' ] ( {
239+ mx . data [ commit === true ? 'commit' : 'save' ] ( {
240240 mxobj : object ,
241241 error : error ,
242242 callback : function ( ) {
@@ -328,7 +328,7 @@ dojo.setObject("TreeView.widget.Commons", (function() {
328328
329329 mx . ui . action ( mfname , {
330330 store : {
331- caller : context . mxform
331+ caller : context
332332 } ,
333333 params : {
334334 applyto : 'selection' ,
@@ -402,20 +402,20 @@ dojo.setObject("TreeView.widget.Commons", (function() {
402402 cb ( null , null ) ;
403403 //GUid only
404404 else if ( typeof ( data ) != "object" && / ^ \d + $ / . test ( data ) ) {
405- mx . processor . get ( {
405+ mx . data . get ( {
406406 guid : data ,
407407 callback : function ( mxobj ) {
408408 if ( mxobj == null )
409409 cb ( null , null )
410410 else
411- cb ( mxobj , mxobj . getGUID ( ) )
411+ cb ( mxobj , mxobj . getGuid ( ) )
412412 } ,
413413 error : this . showError
414414 } , this ) ;
415415 }
416416 //Context is mxobj object
417417 else {
418- var guid = data . getGUID ( ) ;
418+ var guid = data . getGuid ( ) ;
419419 cb ( data , guid ) ;
420420 }
421421 }
@@ -513,7 +513,7 @@ dojo.declare("TreeView.widget.DropDown", null, {
513513 this . dropdown . set ( 'label' , item . label ) ;
514514
515515 return new dijit . MenuItem ( {
516- label : mxui . dom . escapeHTML ( item . label ) ,
516+ label : mxui . dom . escapeString ( item . label ) ,
517517 value : item . value ,
518518 onClick : item . onClick
519519 ? dojo . hitch ( item , item . onClick , dojo . hitch ( this , this . itemClick ) ) //pass itemClick as callback to the onClick, so it can be invoked
@@ -828,7 +828,7 @@ dojo.declare("TreeView.widget.Colrenderer", null, {
828828 if ( value === null || value === undefined )
829829 value = "" ;
830830
831- dojo . html . set ( domNode , this . columnprefix + mxui . dom . escapeHTML ( value ) . replace ( / \n / g, "<br/>" ) + this . columnpostfix ) ;
831+ dojo . html . set ( domNode , this . columnprefix + mxui . dom . escapeString ( value ) . replace ( / \n / g, "<br/>" ) + this . columnpostfix ) ;
832832 dojo . attr ( domNode , 'title' , value ) ;
833833
834834 this . createDefaultImage ( domNode ) ;
@@ -1137,7 +1137,7 @@ dojo.declare("TreeView.widget.RelatedDataset", null, {
11371137 relnewitemcaption : '' ,
11381138
11391139 widget : null ,
1140- contextGUID : null ,
1140+ contextGuid : null ,
11411141 hasData : false ,
11421142
11431143 existingLabels : null ,
@@ -1159,7 +1159,7 @@ dojo.declare("TreeView.widget.RelatedDataset", null, {
11591159 } ) ;
11601160
11611161 this . widget . connect ( this . widget , "update" , dojo . hitch ( this , function ( data , cb ) {
1162- this . contextGUID = data && data . getGUID ? data . getGUID ( ) : data ;
1162+ this . contextGuid = data && data . getGuid ? data . getGuid ( ) : data ;
11631163 this . fetchLabels ( ) ;
11641164 cb && cb ( ) ;
11651165 } ) ) ;
@@ -1175,7 +1175,7 @@ dojo.declare("TreeView.widget.RelatedDataset", null, {
11751175
11761176 getValue : function ( item , _ ) {
11771177 if ( typeof ( item ) == "object" )
1178- return item . getAttribute ( this . relnameattr ) ;
1178+ return item . get ( this . relnameattr ) ;
11791179 else if ( / ^ \d + $ / . test ( item ) ) {
11801180 var obj = this . existingLabelsById [ item ] ; //assuming guid
11811181 return obj ? this . getValue ( obj ) : null ; //TODO: warn?
@@ -1190,14 +1190,14 @@ dojo.declare("TreeView.widget.RelatedDataset", null, {
11901190 } ,
11911191
11921192 fetchLabels : function ( ) {
1193- if ( this . contextGUID == null || this . _fetchingLabels )
1193+ if ( this . contextGuid == null || this . _fetchingLabels )
11941194 return ;
11951195
11961196 this . hasData = false ;
11971197 this . _fetchingLabels = true ;
11981198 var xpath = "//" + this . relentity + this . relconstraint + ( this . relcontextassoc != '' ? "[" + this . relcontextassoc . split ( "/" ) [ 0 ] + " = '[%CurrentObject%]']" : '' ) ;
1199- xpath = xpath . replace ( / \[ \% C u r r e n t O b j e c t \% \] / gi, this . contextGUID ) ;
1200- mx . processor . get ( {
1199+ xpath = xpath . replace ( / \[ \% C u r r e n t O b j e c t \% \] / gi, this . contextGuid ) ;
1200+ mx . data . get ( {
12011201 xpath : xpath ,
12021202 callback : dojo . hitch ( this , this . retrieveLabels ) ,
12031203 filter : {
@@ -1213,8 +1213,8 @@ dojo.declare("TreeView.widget.RelatedDataset", null, {
12131213 this . existingLabelsById = { } ;
12141214
12151215 this . existingOptions = dojo . map ( objects , function ( obj ) {
1216- var value = obj . getGUID ( ) ;
1217- var label = obj . getAttribute ( this . relnameattr ) ;
1216+ var value = obj . getGuid ( ) ;
1217+ var label = obj . get ( this . relnameattr ) ;
12181218
12191219 this . existingLabels [ label . toLowerCase ( ) ] = obj ;
12201220 this . existingLabelsById [ value ] = obj ;
@@ -1251,19 +1251,19 @@ dojo.declare("TreeView.widget.RelatedDataset", null, {
12511251 createNewItem : function ( callback ) {
12521252 var labelname = prompt ( "Please enter " + this . relnewitemcaption , "" ) ;
12531253 if ( labelname ) {
1254- mx . processor . create ( {
1254+ mx . data . create ( {
12551255 entity : this . relentity ,
12561256 error : this . widget . showError ,
12571257 callback : dojo . hitch ( this , function ( label ) {
12581258 var cb = callback
12591259 ? dojo . hitch ( this , callback , {
1260- value : label . getGUID ( ) ,
1260+ value : label . getGuid ( ) ,
12611261 label : labelname
12621262 } )
12631263 : null ;
12641264
12651265 if ( this . relcontextassoc )
1266- TreeView . widget . Commons . store ( label , this . relcontextassoc , this . contextGUID ) ;
1266+ TreeView . widget . Commons . store ( label , this . relcontextassoc , this . contextGuid ) ;
12671267
12681268 TreeView . widget . Commons . store ( label , this . relnameattr , dojo . trim ( labelname ) , null , true , cb ) ;
12691269 } )
@@ -1275,7 +1275,7 @@ dojo.declare("TreeView.widget.RelatedDataset", null, {
12751275
12761276 /* Identity api */
12771277 getIdentity : function ( item ) {
1278- return item . getGUID ( ) ;
1278+ return item . getGuid ( ) ;
12791279 } ,
12801280
12811281 getIdentityAttributes : function ( ) {
@@ -1440,7 +1440,7 @@ dojo.declare("TreeView.widget.SearchControl", null, {
14401440 updateSearchLabel : function ( label ) {
14411441 dojo . empty ( this . labelContainer ) ;
14421442 if ( label != null ) {
1443- var labelname = label . getAttribute ( this . dataset . relnameattr ) ;
1443+ var labelname = label . get ( this . dataset . relnameattr ) ;
14441444 dojo . place ( TreeView . widget . Commons . renderLabel ( labelname , true ) , this . labelContainer ) ;
14451445 }
14461446 } ,
@@ -1491,7 +1491,7 @@ dojo.declare("TreeView.widget.SearchControl", null, {
14911491 }
14921492
14931493 if ( this . searchlabel != null )
1494- xpath += "[" + this . dataset . getAssoc ( ) + " = '" + this . searchlabel . getGUID ( ) + "']" ;
1494+ xpath += "[" + this . dataset . getAssoc ( ) + " = '" + this . searchlabel . getGuid ( ) + "']" ;
14951495
14961496 return xpath ;
14971497 } ,
0 commit comments