Changeset 2114

Show
Ignore:
Timestamp:
03/26/09 16:24:37 (4 years ago)
Author:
lmajano
Message:

Fixes for maintaining lookup state.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • codedepot/trunk/projects/LookupManager/model/lookups/LookupService.cfc

    r2107 r2114  
    410410                                lookupsTables[rc["#listGetAt(arguments.tables,x)#_alias"]] = rc["#listGetAt(arguments.tables,x)#_class"]; 
    411411                        } 
    412                         lookupsTables = replace(instance.json.encode(lookupsTables),'"',"'","all"); 
     412                        /* Get the Original Struct */ 
     413                        originalJSON = instance.json.decode(replace(lookupsSetting[1].xmlAttributes.value,"'",'"',"all")); 
     414                        /* Merge */ 
     415                        structAppend(originalJSON,lookupsTables,true); 
     416                        /* Create as JSON */ 
     417                        originalJSON = replace(instance.json.encode(originalJSON),'"',"'","all"); 
    413418                        /* Set it back in the lookupXML */ 
    414                         lookupsSetting[1].xmlAttributes.value = lookupsTables; 
     419                        lookupsSetting[1].xmlAttributes.value = originalJSON; 
    415420                        /* Write it out */ 
    416421                        FileWrite(rc.ConfigFileLocation,toString(coldboxXMLDoc));