From pbear at ned.gsfc.nasa.gov  Fri Apr  2 15:34:39 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Fri Apr  2 15:34:44 2004
Subject: [Pangalactic-commits] changes to workflow attributes;
	sort attrs in browser grid
Message-ID: <200404022034.i32KYd3k005118@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/enterprise/workflow/wfactivity.py 1.18 1.19
PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py 1.7 1.8
PanGalactic/pangalactic/enterprise/workflow/wfexecutionobject.py 1.17 1.18
PanGalactic/pangalactic/enterprise/workflow/wffactory.py 1.16 1.17
PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py 1.15 1.16
PanGalactic/pangalactic/enterprise/workflow/wfprocess.py 1.22 1.23
PanGalactic/pangalactic/enterprise/workflow/wftransition.py 1.9 1.10
PanGalactic/pangalactic/enterprise/workflow/workflow_wizard.py 1.30 1.31
PanGalactic/pangalactic/utils/configdbbrowser.py 1.7 1.8
PanGalactic/pangalactic/utils/configuredisplay.py 1.6 1.7
PanGalactic/pangalactic/utils/dbbrowser.py 1.12 1.13
PanGalactic/pangalactic/utils/localdb.py 1.73 1.74

Log message:
changes to workflow attributes; sort attrs in browser grid


Index: PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.15 PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.16
--- PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.15	Tue Mar 23 14:32:20 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py	Fri Apr  2 15:34:37 2004
@@ -136,7 +136,7 @@
 
             now = mx.DateTime.DateFromTicks(mx.DateTime.now())
             duedate = wfobj._activity_due_date
-            wfobj_fields = wfobj.getActivity(wfobj.activityId).GetFields()
+            wfobj_fields = wfobj.getActivity(wfobj.activity_id).GetFields()
 
             late = int(wfobj_fields["late"])
             very_late = int(wfobj_fields["very_late"])

Index: PanGalactic/pangalactic/enterprise/workflow/wfactivity.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.18 PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.19
--- PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.18	Tue Mar  9 16:40:29 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfactivity.py	Fri Apr  2 15:34:37 2004
@@ -39,8 +39,8 @@
                 ["Time Frame\n(days)", "self.fields['time frame\n(days)']", "string", ""],
                 ["Description",        "self.fields['description']",        "string", ""]]
 
-    _properties = {"parentId" : "str",
-                   "canStart" : "str"}
+    _properties = {"parent_id" : "str",
+                   "can_start" : "str"}
 
     def __init__(self, wfname, fields, wfdata, parentId, canstart = 0):
         """
@@ -64,8 +64,8 @@
         
         WfExecutionObject.__init__(self, wfname, parentId)
         self.wfdata = wfdata      
-        self.parentId = parentId
-        self.canstart = 0
+        self.parent_id  = parentId
+        self.can_start = 0
         self.fields = fields
 
     def getDuration(self):
@@ -108,7 +108,7 @@
 
     def container(self):
         # wfmc specification
-        return self.parentId
+        return self.parent_id
 
     def result(self):
         # wfmc specification
@@ -158,7 +158,7 @@
             raise CannotStart, "Transition Not Allowed"
 
         global DataManager
-        wfactivity_impl.startActivity(self, self.parentId, DataManager)
+        wfactivity_impl.startActivity(self, self.parent_id, DataManager)
 
 
 # only here until code above includes all this stuff
@@ -193,4 +193,4 @@
 
         
     def setProcessId(self, oid):
-        self.parentId = oid
+        self.parent_id = oid

Index: PanGalactic/pangalactic/enterprise/workflow/workflow_wizard.py
diff -u PanGalactic/pangalactic/enterprise/workflow/workflow_wizard.py:1.30 PanGalactic/pangalactic/enterprise/workflow/workflow_wizard.py:1.31
--- PanGalactic/pangalactic/enterprise/workflow/workflow_wizard.py:1.30	Fri Mar  5 16:18:13 2004
+++ PanGalactic/pangalactic/enterprise/workflow/workflow_wizard.py	Fri Apr  2 15:34:37 2004
@@ -274,7 +274,10 @@
         wfdata = None
         for akey, avalue in activities.items():
             #print "akey", akey, "; avalue", avalue
-            wfactivity = wffactory.newWfActivity(avalue["activity"], process.pgef_oid, avalue, wfdata)
+            wfactivity = wffactory.newWfActivity(name = avalue["activity"],
+                                                 processid = process.pgef_oid,
+                                                 fields = avalue,
+                                                 wfdata = wfdata)
             activitydict[wfactivity.pgef_oid] = wfactivity
             self.dm.add([wfactivity])
         #print "activitydict", activitydict
@@ -379,7 +382,7 @@
         from_col = 0
         to_col = 1
         activities = []
-        for tkey, tvalue in wfobj.transitionsdict.items():
+        for tkey, tvalue in wfobj.transitions_dict.items():
             #print "transition", tkey, tvalue.oid, tvalue.from_activity, tvalue.to_activity
             from_activity = self.dm.getLookupObject(tvalue.from_activity)
             to_activity = self.dm.getLookupObject(tvalue.to_activity)

Index: PanGalactic/pangalactic/utils/configdbbrowser.py
diff -u PanGalactic/pangalactic/utils/configdbbrowser.py:1.7 PanGalactic/pangalactic/utils/configdbbrowser.py:1.8
--- PanGalactic/pangalactic/utils/configdbbrowser.py:1.7	Wed Mar 31 16:17:20 2004
+++ PanGalactic/pangalactic/utils/configdbbrowser.py	Fri Apr  2 15:34:37 2004
@@ -10,8 +10,6 @@
 from wxPython.lib.mixins.listctrl import wxColumnSorterMixin
 from pangalactic.utils.configuredisplay import ConfigureDisplay
 
-# WDR: classes
-
 DISPLAY_CONFIG = "display_config"
 
 class ConfigDbBrowser(ConfigureDisplay, wxColumnSorterMixin):

Index: PanGalactic/pangalactic/enterprise/workflow/wffactory.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.16 PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.17
--- PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.16	Tue Mar  9 16:40:29 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wffactory.py	Fri Apr  2 15:34:37 2004
@@ -29,9 +29,9 @@
 
 DEFAULT_WORKFLOW1 = ("WF1 - generally used for NASA Alerts and Advisories",
                     
-                     {0:{"activity":"Draft",     "duration":"30",
+                     {0:{"activity":"Initiated",     "duration":"30",
                          "late":"30", "very_late":"45", "lost_cause":"60",
-                         "description":"Final Draft"},
+                         "description":"Draft"},
                       1:{"activity":"Approved",  "duration":"10",
                          "late":"10", "very_late":"15", "lost_cause":"20",
                          "description":"Approved for Release"},
@@ -39,7 +39,7 @@
                          "late":"10", "very_late":"20", "lost_cause":"30",
                          "description":"Released to Distribution List"}},
                     
-                     {0:{"from":"Draft",     "to":"Approved"},
+                     {0:{"from":"Initiated", "to":"Approved"},
                       1:{"from":"Approved",  "to":"Released"}})
 
 DEFAULT_WORKFLOWS = [DEFAULT_WORKFLOW0, DEFAULT_WORKFLOW1]
@@ -121,7 +121,7 @@
     for tkey, tvalue in wfobj.transitions.items():
         transitions[tkey] = copy.deepcopy(tvalue)
     transitionsdict = {}
-    for tkey, tvalue in wfobj.transitionsdict.items():
+    for tkey, tvalue in wfobj.transitions_dict.items():
         transitionsdict[tkey] = copy.deepcopy(tvalue)
     obj.SetActivities(activities)
     obj.SetTransitionsDict(transitionsdict)
@@ -133,29 +133,29 @@
     # warning, warning... danger will robinson
     # for now, each activity in a process is a WfActivity.  This method
     # needs expansion to handle an activity that is a WfProcess.
-    newwfobj = WfProcess(wfobj.name, {}, {}, {}, [], wfobj.defaultstartid)
+    newwfobj = WfProcess(wfobj.name, {}, {}, {}, [], wfobj.default_start_id)
 
     activities = {}
     a_old2new = {}
     for akey, avalue in wfobj.activities.items():
-        obj = newWfActivity(avalue.fields["activity"], newwfobj.pgef_oid)
+        obj = newWfActivity(name = avalue.fields["activity"], processid = newwfobj.pgef_oid)
         pgef_oid = obj.pgef_oid
         obj = copy.deepcopy(avalue)
         obj.oid = pgef_oid
         obj.pgef_oid = pgef_oid
-        obj.parentId = newwfobj.pgef_oid
+        obj.parent_id = newwfobj.pgef_oid
         activities[pgef_oid] = obj
         #print "activity", obj
         a_old2new[akey] = pgef_oid
 
         # synchronize the default start activity
-        if akey == wfobj.defaultstartid:
-            newwfobj.defaultstartid = pgef_oid
+        if akey == wfobj.default_start_id:
+            newwfobj.default_start_id = pgef_oid
 
     #print "activities", activities
     transitionsdict = {}
     t_old2new = {}
-    for tkey, tvalue in wfobj.transitionsdict.items():
+    for tkey, tvalue in wfobj.transitions_dict.items():
         obj = newWfTransition(newwfobj.pgef_oid)
         for old_akey, new_akey in a_old2new.items():
             if tvalue.from_activity == old_akey:
@@ -171,7 +171,7 @@
 
 
 def getDefaultWorkflows():
-    #print "wffactory.getdefaultworkflows"
+    print "\n\nwffactory.getdefaultworkflows"
     processes = []
     for default_workflow in DEFAULT_WORKFLOWS:
         wfpname = default_workflow[0]
@@ -181,7 +181,7 @@
         activitydict = {}
         activities = default_workflow[1]
         for akey, avalue in activities.items():
-            wfobj = newWfActivity(avalue["activity"], process.pgef_oid)
+            wfobj = newWfActivity(name = avalue["activity"], processid = process.pgef_oid)
             wfobj.setFields(avalue)
             activitydict[wfobj.pgef_oid] = wfobj
         #print "wffactory.getdefaultworkflow", activitydict
@@ -209,9 +209,9 @@
 
         process.SetActivities(activitydict)
         process.SetTransitionsDict(transitiondict)
-        #print "process", process.pgef_oid
-        #print "process", process.activities
-        #print "process", process.transitions
+        print "process id", process.pgef_oid, process.name
+        print "\nprocess a", process.activities
+        #print "\nprocess t", process.transitions
 
         tolist.sort()
         for a in tolist:
@@ -219,11 +219,11 @@
                 fromlist.remove(a)
             except:
                 pass
-        #print "fromlist", fromlist
+        print "fromlist", fromlist
         process.SetDefaultStartId(fromlist[0])
 
         processes.append(process)
-    #print "processes", processes
+    print "processes", processes
     return processes
     
     

Index: PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py:1.7 PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py:1.8
--- PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py:1.7	Fri Mar  5 16:18:13 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py	Fri Apr  2 15:34:37 2004
@@ -16,9 +16,9 @@
     Note: Any methods required by WfMC are commented as such.
     """
 
-    _properties = {"eventType" : "int",
-                   "wfobjectid" : "str",
-                   "timestamp" : "DateTime"}
+    _properties = {"event_type"  : "int",
+                   "wfobject_id" : "str",
+                   "timestamp"   : "DateTime"}
     
     def __init__(self, wfobject, eventType, wfobjid):
         """
@@ -35,9 +35,9 @@
         PgefObject.__init__(self)
         self.oid = self.pgef_oid
         self.wfobject = wfobject
-        self.eventType = eventType;
-        self.timeStamp = time.time()
-        self.wfobjectid = wfobjid
+        self.event_type = eventType;
+        self.timestamp = time.time()
+        self.wfobject_id = wfobjid
    
 
     def source(self):
@@ -47,12 +47,12 @@
  
     def timeStamp(self):
         # wfmc specification
-        return self.timeStamp
+        return self.time_stamp
    
 
     def eventType(self):
         # wfmc specification
-        return self.eventType
+        return self.event_type
    
 
     def activityKey(self):

Index: PanGalactic/pangalactic/enterprise/workflow/wfexecutionobject.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfexecutionobject.py:1.17 PanGalactic/pangalactic/enterprise/workflow/wfexecutionobject.py:1.18
--- PanGalactic/pangalactic/enterprise/workflow/wfexecutionobject.py:1.17	Tue Mar  9 16:40:29 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfexecutionobject.py	Fri Apr  2 15:34:37 2004
@@ -23,7 +23,7 @@
     ###
 
     _properties = {"oid" : "str",
-                   "parentId" : "str",
+                   "parent_id" : "str",
                    "description" : "str"}
                    
                    
@@ -39,7 +39,7 @@
          
 #        self.pgef_oid = oid.generate()
         self.oid = self.pgef_oid
-        self.parentId = parentId  # WorkEffort ID of the parent runtime object (null for process)
+        self.parent_id = parentId  # WorkEffort ID of the parent runtime object (null for process)
         self.name = wfname
         self.description = ""
         self.history = []

Index: PanGalactic/pangalactic/enterprise/workflow/wftransition.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.9 PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.10
--- PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.9	Fri Mar  5 16:18:13 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wftransition.py	Fri Apr  2 15:34:37 2004
@@ -8,7 +8,7 @@
     @param from_activity: The starting state (WfActivity) 
     """
 
-__version__ = "$Revision: 1.9 $"[11:-2]
+__version__ = "$Revision: 1.10 $"[11:-2]
 
 from pangalactic.utils import oid
 from pangalactic.enterprise.pgefobject import PgefObject
@@ -45,7 +45,7 @@
         PgefObject.__init__(self)
 #        self.pgef_oid = oid.generate()
         self.oid = self.pgef_oid
-        self.parentId = parentId  # oid of parent WfProcess
+        self.parent_id = parentId  # oid of parent WfProcess
         self.from_activity = from_activity
         self.to_activity = to_activity
 

Index: PanGalactic/pangalactic/enterprise/workflow/wfprocess.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.22 PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.23
--- PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.22	Fri Mar  5 16:18:13 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfprocess.py	Fri Apr  2 15:34:37 2004
@@ -29,18 +29,12 @@
     that an existing WfProcess is a state of the workflow.  
     """    
 
-    _defaultgridmap = [["Name",            "self.name",            "string", ""]]
-#                       ["# Activities" ,   "self.nsteps",          "string", ""],
-#                       ["# Transitions" ,  "self.nsteps",          "string", ""],
-#                       ["Date",            "self.create_date_str", "string", ""]]
-
-    _gridmap = [["Name",            "self.name",           "string", ""]]
-#                ["# Activities" ,   "self._nstates",       "string", ""],
-#                ["# Transitions" ,  "self._nsteps",        "string", ""],
-#                ["Date",            "self._CreateDateStr", "string", ""]]
+    _defaultgridmap = [["Name", "self.name", "string", ""]]
 
-    _properties = {"activityId" : "str",
-                   "defaultStartId" : "str"}
+    _gridmap = [["Name", "self.name", "string", ""]]
+
+    _properties = {"activity_id"      : "str",
+                   "default_start_id" : "str"}
 
     _instancegridmap = [["Workflow Data",   "self.wfdata_name",            "string", ""],
                         ["# Steps",         "self._nstates",               "string", ""],
@@ -77,17 +71,17 @@
         # for now, only 1 activity can be active at a time
 
         self.activities = activities
-        self.transitionsdict = transitiondict  # dictionary of transitions by transition id
+        self.transitions_dict = transitiondict  # dictionary of transitions by transition id
         self.transitions = transitions         # dictionary of transition id lists by activity id
-        self.canstartlist = canstartlist
-        self.defaultstartid = defaultstart
+        self.can_start_list = canstartlist
+        self.default_start_id = defaultstart
         self.requester = None
-        self.nextTransList = []
-        self.activityId = None
+        self.next_trans_list = []
+        self.activity_id = None
         
         self._nstates = self.howManyStep()
-        self._nsteps = len(self.transitionsdict)
-        self._CreateDateStr = self.GetCreateDateStr()
+        self._nsteps = len(self.transitions_dict)
+        self._create_date_str = self.GetCreateDateStr()
         self._activity_name = "N/A"
         self._next_activity_name = ""
         self._activity_date = ""
@@ -100,7 +94,7 @@
         
         for key, activity in self.activities.items():
             if key in canstartlist:
-                activity.canstart = 1
+                activity.can_start = 1
                 self.activities[key] = activity
 
 
@@ -110,11 +104,11 @@
         #print "wfprocess.calctransitions.activities"
         #print self.activities
         #print "wfprocess.calctransitions.transitionsdict"
-        #print self.transitionsdict
+        #print self.transitions_dict
         for actkey, actvalue in self.activities.items():
             #print "actkey", actkey, actvalue.name
             transitions[actkey] = []
-            for tkey, tvalue in self.transitionsdict.items():
+            for tkey, tvalue in self.transitions_dict.items():
                 #print "tkey", tkey
                 if isinstance(tvalue, types.ListType):
                     #print "instance of a List", tvalue
@@ -133,7 +127,7 @@
         
     def SetDefaultStartId(self, activityid):
         #print "wfprocess.setdefaultstart", activityid
-        self.defaultstartid = activityid
+        self.default_start_id = activityid
 
 
     def setDataManager(self, datamgr):
@@ -156,11 +150,11 @@
         """
         Start a wfprocess instance.  Only a wfprocess instance has a wfdata object.
         """
-        #print "wfprocess.initiate", self.defaultstartid
+        #print "wfprocess.initiate", self.default_start_id
         self.SetData(wfdata)
         datamgr.saveWfProcess(self)
-        self.activityId = self.defaultstartid
-        current_activity = self.activities[self.activityId]
+        self.activity_id = self.default_start_id
+        current_activity = self.activities[self.activity_id]
         current_activity.changeState(OPEN_NOTSTARTED)
         #print "current_activity", current_activity.getState()
         self.setDataManager(datamgr)
@@ -194,18 +188,18 @@
         # set/reset the states in this workflow
         self.activities = activitydict
         self._nstates = self.howManyStep()
-        self.canstartlist = []
+        self.can_start_list = []
         for key, activity in self.activities.items():
-            if key in self.canstartlist:
+            if key in self.can_start_list:
                 activity.canstart = 1
-                self.canstartlist.append(activity.oid)
+                self.can_start_list.append(activity.oid)
 
     def SetTransitionsDict(self, transitiondict):
         #print "wfprocess.settransitions", transitiondict
         # set/reset the transitions between the states in this workflow
-        self.transitionsdict = transitiondict
+        self.transitions_dict = transitiondict
         self.transitions = self.calcTransitions()
-        self._nsteps = len(self.transitionsdict)
+        self._nsteps = len(self.transitions_dict)
         
     def SetTransitions(self, transitions):
         #print "wfprocess.settransitions", transitions
@@ -288,7 +282,7 @@
         if (self.getState() == OPEN_RUNNING):
             raise AlreadyRunning, "Process is already running"
 
-        startValue = self.activities[self.defaultstartid]
+        startValue = self.activities[self.default_start_id]
         self.startActivity(startValue)
         self.getNextActivityData(startValue)
     
@@ -308,10 +302,10 @@
 
     ## Queues the next activities for processing
     def getNextActivityData(self, fromActivity):
-        self.nextTransList = self.transitions[fromActivity.oid]
-        if len(self.nextTransList) > 0:
-            nextTransId = self.nextTransList[0]
-            nextTransObj = self.transitionsdict[nextTransId]
+        self.next_trans_list = self.transitions[fromActivity.oid]
+        if len(self.next_trans_list) > 0:
+            nextTransId = self.next_trans_list[0]
+            nextTransObj = self.transitions_dict[nextTransId]
             toActivity = self.activities[nextTransObj.to_activity]
 
             self._activity_name = fromActivity.getName()
@@ -335,7 +329,7 @@
         try:
             activity.activate()
             #print "current_activity", activity.getState()
-            self.activityId = activity.oid
+            self.activity_id = activity.oid
         except AlreadyRunning, e:
             raise WfException, "Activity already running"
         except CannotStart, e:

Index: PanGalactic/pangalactic/utils/configuredisplay.py
diff -u PanGalactic/pangalactic/utils/configuredisplay.py:1.6 PanGalactic/pangalactic/utils/configuredisplay.py:1.7
--- PanGalactic/pangalactic/utils/configuredisplay.py:1.6	Mon Mar 29 11:57:20 2004
+++ PanGalactic/pangalactic/utils/configuredisplay.py	Fri Apr  2 15:34:37 2004
@@ -1,6 +1,6 @@
 #!/bin/env python
 #----------------------------------------------------------------------------
-# Name:         baseconfiguregrid.py
+# Name:         configuredisplay.py
 # Author:       XXXX
 # Created:      XX/XX/XX
 # Copyright:    
@@ -197,6 +197,7 @@
 
         #move the item in the grid to keep them synced
         self.MoveInGrid(self.grid, current_ndx, direction)
+        
     
     def MoveInGrid(self, grid_obj, current_ndx, direction):
         if current_ndx == 0 and direction == -1:
@@ -224,8 +225,7 @@
         for x in range(len(current_row_data)):
             grid_obj.SetCellValue(new_index,x, current_row_data[x])                               
         
-    # WDR: handler implementations for ConfigDbBrowser
-    
+
     def OnShownItemClick(self, event):
         currentItem = event.m_itemIndex
         self.grid.ClearSelection()

Index: PanGalactic/pangalactic/utils/localdb.py
diff -u PanGalactic/pangalactic/utils/localdb.py:1.73 PanGalactic/pangalactic/utils/localdb.py:1.74
--- PanGalactic/pangalactic/utils/localdb.py:1.73	Wed Mar 31 16:17:20 2004
+++ PanGalactic/pangalactic/utils/localdb.py	Fri Apr  2 15:34:37 2004
@@ -609,6 +609,7 @@
                     self.saveItWithLookup(self.PARTSLIST, obj, override)
 
                 elif isinstance(obj, document.Document):
+                    print "saving document"
                     self.saveItWithLookup(self.DOCUMENT, obj, override)
                         
                 elif isinstance(obj, pgeffile.PgefFile):
@@ -814,7 +815,7 @@
 
 
     def SaveWfProcess(self, wflist, recurse = False):
-        #print "localdb.SaveWfProcess", wflist
+        print "\n\nlocaldb.SaveWfProcess", wflist
         for wfobj in wflist:
             if wfobj.wfdata:
                 self.saveItWithLookup(self.WFPROCESS, wfobj, True)
@@ -823,8 +824,9 @@
 
             if recurse:
                 for akey, avalue in wfobj.activities.items():
+                    print "activity", akey, avalue.id, avalue.name, avalue.fields
                     self.saveItWithLookup(self.WFACTIVITY, avalue, True)
-                for tkey, tvalue in wfobj.transitionsdict.items():
+                for tkey, tvalue in wfobj.transitions_dict.items():
                     self.saveItWithLookup(self.WFTRANSITION, tvalue, True)
         self.Commit()
 

Index: PanGalactic/pangalactic/utils/dbbrowser.py
diff -u PanGalactic/pangalactic/utils/dbbrowser.py:1.12 PanGalactic/pangalactic/utils/dbbrowser.py:1.13
--- PanGalactic/pangalactic/utils/dbbrowser.py:1.12	Wed Mar 31 16:17:20 2004
+++ PanGalactic/pangalactic/utils/dbbrowser.py	Fri Apr  2 15:34:37 2004
@@ -22,6 +22,7 @@
 
 DEBUG = 1
 DISPLAY_CONFIG = "display_config"
+
 COMPLEX_CLASS_TYPES = ["Project", "Acu", "Part", "Model", "Document", "DocPtRel"]
 
 class zodbbrowser(wxPanel):
@@ -33,7 +34,7 @@
         self.dbfile = None
         self.current_config = {}
         ZODBBrowserFunc(self, true)
-        # WDR: handler declarations for zodbbrowser
+
         EVT_LISTBOX(self, ID_ROOTITEMS, self.FillGrid)
         EVT_BUTTON(self, ID_CLOSE, self.OnClose)
         EVT_CLOSE(self, self.OnClose)
@@ -43,8 +44,6 @@
         self.grid = self.GetGrid()
         
 
-    # WDR: methods for zodbbrowser
-
     def GetRootitems(self):
         return wxPyTypeCast(self.FindWindowById(ID_ROOTITEMS), "wxListBox")
 
@@ -65,7 +64,9 @@
         if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
             items.remove(configdbbrowser.DISPLAY_CONFIG)
         choice.InsertItems(items, 0)
-#        choice.SetSelection(0)
+
+        # for now, do not automatically select a dictionary
+        #choice.SetSelection(0)
         
         
     def ClearGrid(self):
@@ -74,7 +75,6 @@
             self.grid.DeleteRows(0, gridrows)
 
 
-    # WDR: handler implementations for zodbbrowser
     def OnClose(self, event):
         self.Parent.Close()
 
@@ -113,10 +113,9 @@
                 if self.dbroot[configdbbrowser.DISPLAY_CONFIG]:
                     self.current_config = self.dbroot[configdbbrowser.DISPLAY_CONFIG]
         print "self.current_config", self.current_config
-        #if len(self.current_config) == 0:
-        #    print "zero length"
+        if len(self.current_config) == 0:
+            print "no config; setup default config.  tbd"
             
-
         
     def FileOpen(self, event = None):
         wildcard = "ZODB FileStorage (*.fs)|*.fs|" \
@@ -172,13 +171,13 @@
                 
         
     def FillGrid(self, event = None):
-        print "\ndbbrowser.fillgrid"
+        print "dbbrowser.fillgrid"
         if self.dbroot:
             if self.dbroot.has_key(DISPLAY_CONFIG):
                 self.current_config = self.dbroot[DISPLAY_CONFIG]
             selection = self.GetRootitems().GetStringSelection()
             collection_dict = self.dbroot[selection]
-            print "selected dict", selection, "collection length", len(collection_dict)
+            print "selected_dict", selection, "collection_length", len(collection_dict)
             #print "collection", collection_dict
 
             numrows = len(collection_dict)
@@ -201,7 +200,7 @@
                 for obj_id, obj in collection_dict.items():
                     if isinstance(obj, types.StringType):
                         self.grid.SetCellValue(curr_row, 0, obj_id)
-                        self.grid.SetCellValue(curr_row, 1, obj)
+                        self.grid.SetCellValue(curr_row, 1, str(obj))
                         curr_row += 1
                     else:
                         for attr, value in obj.__dict__.items():
@@ -223,23 +222,16 @@
                 col = 0
                 maxcols = 0
                 # how many columns should there be?
-                try:
-                    for obj_id, obj in collection_dict.items():
-                        if isinstance(obj, types.StringType):
-                            maxcols = 2
-                            break
-                        if isinstance(obj, types.DictType):
-                            maxcols = 3
-                            self.grid.AppendRows(len(obj) - 1)
-                            break
-                        elif isinstance(obj, types.ListType):
-                            maxcols = len(obj)
-                        else:
-                            curr_cols = len(obj.__dict__)
-                            if curr_cols > maxcols:
-                                maxcols = curr_cols
-                except:
-                    print "dbbrowser.fillgrid: Attempt to count an ungriddable object", selection
+                for obj_id, obj in collection_dict.items():
+                    if hasattr(obj, "__dict__"):
+                        curr_cols = len(obj.__dict__)
+                        if curr_cols > maxcols:
+                            maxcols = curr_cols
+                    elif isinstance(obj, types.StringType):
+                        maxcols = 2
+                    else:
+                        print "dbbrowser.fillgrid: only objects", selection
+                        return
                     
                 if self.grid.GetNumberCols() > 0:
                     self.grid.DeleteCols(0, self.grid.GetNumberCols())
@@ -247,43 +239,42 @@
                 for col in range(maxcols):
                      self.grid.SetColLabelValue(col, str(col + 1))
 
-                # fill in the grid
-                try:
-                    for obj_id, obj in collection_dict.items():
-                        col = 0
-                        #print "collection", obj_id
-                        if isinstance(obj, types.StringType):
-                            self.grid.SetCellValue(curr_row, col, obj_id)
-                            self.grid.SetCellValue(curr_row, col + 1, obj)
-                            curr_row += 1
-                        elif isinstance(obj, types.DictType):
-                            for key, value in obj.items():
-                                #print obj_id, key, value
-                                self.grid.SetCellValue(curr_row, 0, obj_id)
-                                self.grid.SetCellValue(curr_row, 1, str(key))
-                                self.grid.SetCellValue(curr_row, 2, str(value))
-                                curr_row += 1
-                        else:
-                            for attr, value in obj.__dict__.items():
-                                try:
-                                    if value.__class__.__name__ in COMPLEX_CLASS_TYPES:
-                                        val = value.id
-                                    else:
-                                        val = str(value)
-                                except:
+                obj_keys = collection_dict.keys()
+                obj_keys.sort()
+                for obj_key in obj_keys:
+                    obj = collection_dict[obj_key]
+                    col = 0
+                    if hasattr(obj, "__dict__"):
+                        attr_keys = obj.__dict__.keys()
+                        attr_keys.sort()
+                        for attr_key in attr_keys:
+                            value = obj.__dict__[attr_key]
+                            try:
+                                if value.__class__.__name__ in COMPLEX_CLASS_TYPES:
+                                    val = value.id
+                                else:
                                     val = str(value)
+                            except:
+                                val = str(value)
+
+                            self.grid.SetCellValue(curr_row, col, val)
+
+                            if curr_row == 0:
+                                col_label = attr_key.replace("_", " ").title().strip()
+                                self.grid.SetColLabelValue(col, col_label)
+
+                            col += 1
+                    elif isinstance(obj, types.StringType):
+                        self.grid.SetCellValue(curr_row, 0, str(obj_key))
+                        self.grid.SetCellValue(curr_row, 1, str(obj))
+
+                        if curr_row == 0:
+                            self.grid.SetColLabelValue(0, "Id")
+                            self.grid.SetColLabelValue(1, "Value")
 
-                                self.grid.SetCellValue(curr_row, col, val)
-#                                self.grid.SetCellValue(curr_row, col, str(value))
+                        col += 1
 
-                                if curr_row == 0:
-                                    col_label = attr.replace("_", " ").title().strip()
-                                    self.grid.SetColLabelValue(col, col_label)
-
-                                col += 1
-                            curr_row += 1
-                except:
-                    print "dbbrowser.fillgrid: Attempt to display an ungriddable object", selection
+                    curr_row += 1
                     
             self.grid.AutoSizeColumns(true)
 

From pbear at ned.gsfc.nasa.gov  Mon Apr  5 15:41:22 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Mon Apr  5 15:41:25 2004
Subject: [Pangalactic-commits] more improvements to db browser
Message-ID: <200404051941.i35JfMGU004151@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/client/modules/psm/itemsearchform.py 1.18 1.19
PanGalactic/pangalactic/client/modules/psm/itemsearchform.wdr 1.6 1.7
PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py 1.6 1.7
PanGalactic/pangalactic/client/modules/psm/searchframe.py 1.32 1.33
PanGalactic/pangalactic/utils/dbbrowser.py 1.13 1.14
PanGalactic/pangalactic/utils/xmlrpcinterface.py 1.46 1.47

Log message:
more improvements to db browser


Index: PanGalactic/pangalactic/client/modules/psm/itemsearchform.py
diff -u PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.18 PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.19
--- PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.18	Tue Mar 23 14:32:19 2004
+++ PanGalactic/pangalactic/client/modules/psm/itemsearchform.py	Mon Apr  5 15:41:20 2004
@@ -149,7 +149,7 @@
     def getSearchCriteria(self):
         fieldcount = 0
         classattrdict = {}
-        classname = "Part"
+        classnames = ["Part", "Model"]
         fields = []
 
         field = self.GetTextctrlPOC().GetValue()
@@ -157,7 +157,7 @@
             field = ""
         else:
             fieldcount += 1
-            fields.append(("owner_oid", field, LIKE_STR))  # there is currently a bug in search.
+            fields.append(("owner_oid", field))#, LIKE_STR))  # there is currently a bug in search.
                                                            # when it's fixed, put the comparators back
 
         field = self.GetTextctrlPartName().GetValue()
@@ -165,28 +165,28 @@
             field = ""
         else:
             fieldcount += 1
-            fields.append(("short_description", field, LIKE_STR))
+            fields.append(("short_description", field))#, LIKE_STR))
 
         field = self.GetTextctrlIdentifier().GetValue()
         if field == None or len(field) == 0:
             field = ""
         else:
             fieldcount += 1
-            fields.append(("id", field, LIKE_STR))
+            fields.append(("id", field))#, LIKE_STR))
 
         field = self.GetTextctrlNameCode().GetValue()
         if field == None or len(field) == 0:
             field = ""
         else:
             fieldcount += 1
-            fields.append(("name", field, LIKE_STR))
+            fields.append(("name", field))#, LIKE_STR))
 
         field = self.GetTextctrlAuthor().GetValue()
         if field == None or len(field) == 0:
             field = ""
         else:
             fieldcount += 1
-            fields.append(("creator_oid", field, LIKE_STR))
+            fields.append(("creator_oid", field))#, LIKE_STR))
 
         field = self.GetComboProject().GetValue()
         if field == None or len(field) == 0 or field == "Any":
@@ -194,11 +194,11 @@
         else:
             fieldcount += 1
             id_context = field.split(" (")
-            #fields.append(("project_id", field))#, LIKE_STR))
-            fields.append(("project_oid", id_context[0], LIKE_STR))
+            fields.append(("project_oid", id_context[0]))#, LIKE_STR))
 
         if fieldcount > 0:
-            classattrdict[classname] = fields
+            for classname in classnames:
+                classattrdict[classname] = fields
         return classattrdict
         
 

Index: PanGalactic/pangalactic/utils/dbbrowser.py
diff -u PanGalactic/pangalactic/utils/dbbrowser.py:1.13 PanGalactic/pangalactic/utils/dbbrowser.py:1.14
--- PanGalactic/pangalactic/utils/dbbrowser.py:1.13	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/utils/dbbrowser.py	Mon Apr  5 15:41:21 2004
@@ -24,6 +24,9 @@
 DISPLAY_CONFIG = "display_config"
 
 COMPLEX_CLASS_TYPES = ["Project", "Acu", "Part", "Model", "Document", "DocPtRel"]
+DOC_CLASS_TYPES     = ["PgefAdvisory", "NasaAdvisory",
+                       "GidepAlert", "GidepProblemAdvisory", "NasaImpactStatement"]
+EXCLUDE_LIST = ["UncommittedObjects"]
 
 class zodbbrowser(wxPanel):
     def __init__(self, parent, id, pos = wxDefaultPosition, size = wxDefaultSize, localdb = None):
@@ -156,8 +159,8 @@
         cfg_frame.Show(true)
 
         
-    def ResetCols(self, selection):
-#        print "dbbrowser.resetcols", selection
+    def setColLabels(self, selection):
+#        print "dbbrowser.setcollabels", selection
         if self.current_config.has_key(selection):
             numcols = self.grid.GetNumberCols()
             if numcols > 0:
@@ -173,110 +176,190 @@
     def FillGrid(self, event = None):
         print "dbbrowser.fillgrid"
         if self.dbroot:
-            if self.dbroot.has_key(DISPLAY_CONFIG):
-                self.current_config = self.dbroot[DISPLAY_CONFIG]
             selection = self.GetRootitems().GetStringSelection()
-            collection_dict = self.dbroot[selection]
-            print "selected_dict", selection, "collection_length", len(collection_dict)
-            #print "collection", collection_dict
 
-            numrows = len(collection_dict)
+            if selection in EXCLUDE_LIST:
+                print selection, "is not implemented"
+                return
 
+            # how many rows should there be?
+            collection_dict = self.dbroot[selection]
             self.ClearGrid()
-            curr_row = 0
-
+            numrows = len(collection_dict)
             if numrows > 0:
                 self.grid.AppendRows(numrows)
                 
-            #print "currentconfig", self.current_config, selection
-            #print self.current_config.has_key(selection), len(self.current_config[selection])
+            # make sure the grid has the correct number of columns
+            # and set the column labels
+            if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
+                self.current_config = self.dbroot[DISPLAY_CONFIG]
+
             if self.current_config.has_key(selection) and (len(self.current_config[selection]) > 0):
+                # there is an entry in the configuration dictionary
                 mapping = self.current_config[selection]
-                #print "\nmapping", mapping
-                #print "\nconfig", self.current_config
-                self.ResetCols(selection)
+                self.setColLabels(selection)
                 displayed_fields = [disp_col[0] for disp_col in mapping]
 
-                for obj_id, obj in collection_dict.items():
-                    if isinstance(obj, types.StringType):
-                        self.grid.SetCellValue(curr_row, 0, obj_id)
-                        self.grid.SetCellValue(curr_row, 1, str(obj))
-                        curr_row += 1
-                    else:
-                        for attr, value in obj.__dict__.items():
-                            if attr in displayed_fields:
-                                try:
-                                    if value.__class__.__name__ in COMPLEX_CLASS_TYPES:
-                                        val = value.id
-                                    else:
-                                        val = str(value)
-                                except:
-                                    val = str(value)
-                                self.grid.SetCellValue(curr_row, displayed_fields.index(attr), val)
-                        curr_row += 1
             else:
-                #print "no key"
+                # there is no entry in the configuration dictionary; generate default
                 if self.grid.GetNumberCols() > 0:
                     self.grid.DeleteCols(0, self.grid.GetNumberCols())
                 
-                col = 0
-                maxcols = 0
                 # how many columns should there be?
+                maxcols = 0
                 for obj_id, obj in collection_dict.items():
                     if hasattr(obj, "__dict__"):
-                        curr_cols = len(obj.__dict__)
-                        if curr_cols > maxcols:
-                            maxcols = curr_cols
-                    elif isinstance(obj, types.StringType):
-                        maxcols = 2
-                    else:
-                        print "dbbrowser.fillgrid: only objects", selection
-                        return
-                    
-                if self.grid.GetNumberCols() > 0:
-                    self.grid.DeleteCols(0, self.grid.GetNumberCols())
-                self.grid.AppendCols(maxcols)
-                for col in range(maxcols):
-                     self.grid.SetColLabelValue(col, str(col + 1))
-
-                obj_keys = collection_dict.keys()
-                obj_keys.sort()
-                for obj_key in obj_keys:
-                    obj = collection_dict[obj_key]
-                    col = 0
-                    if hasattr(obj, "__dict__"):
-                        attr_keys = obj.__dict__.keys()
-                        attr_keys.sort()
-                        for attr_key in attr_keys:
-                            value = obj.__dict__[attr_key]
-                            try:
-                                if value.__class__.__name__ in COMPLEX_CLASS_TYPES:
-                                    val = value.id
-                                else:
-                                    val = str(value)
-                            except:
-                                val = str(value)
-
-                            self.grid.SetCellValue(curr_row, col, val)
-
-                            if curr_row == 0:
+                        try:
+                            maxcols = len(obj.__dict__)
+                            self.grid.AppendCols(maxcols)
+                            attr_keys = obj.__dict__.keys()
+                            attr_keys.sort()
+                            mapping = []
+                            col = 0
+                            
+                            # make the column labels (attribute names) look pretty
+                            for attr_key in attr_keys:
                                 col_label = attr_key.replace("_", " ").title().strip()
                                 self.grid.SetColLabelValue(col, col_label)
+                                mapping.append((attr_key, col_label))
+                                col += 1
+                            self.current_config[selection] = mapping
+                            if len(mapping) > 0:
+                                displayed_fields = [disp_col[0] for disp_col in mapping]
+                            break
+                        except:
+                            print "Sorry.  Ungriddable object.  Try again."
+                            return
 
-                            col += 1
                     elif isinstance(obj, types.StringType):
-                        self.grid.SetCellValue(curr_row, 0, str(obj_key))
-                        self.grid.SetCellValue(curr_row, 1, str(obj))
-
-                        if curr_row == 0:
-                            self.grid.SetColLabelValue(0, "Id")
-                            self.grid.SetColLabelValue(1, "Value")
+                        maxcols = 2
+                        self.grid.AppendCols(maxcols)
+                        self.grid.SetColLabelValue(0, "Id")
+                        self.grid.SetColLabelValue(1, "Value")
+                        break
 
+                    else:
+                        print "dbbrowser.fillgrid: only objects or strings", selection
+                        return
+                    
+            # fill in the grid cells
+            curr_row = 0
+            col = 0
+            for obj_id, obj in collection_dict.items():
+                if isinstance(obj, types.StringType):
+                    self.grid.SetCellValue(curr_row, 0, obj_id)
+                    self.grid.SetCellValue(curr_row, 1, str(obj))
+
+                elif hasattr(obj, "__dict__"):
+                    for col in range(len(displayed_fields)):
+                        attr = displayed_fields[col]
+                        attrvalue = obj.__dict__[attr]
+                        try:
+                            classname = attrvalue.__class__.__name__
+                            if classname in DOC_CLASS_TYPES:
+                                val = attrvalue.getPrettyDocType()
+                            elif classname in COMPLEX_CLASS_TYPES:
+                                val = classname
+                            else:
+                                val = str(attrvalue)
+                        except:
+                            val = str(attrvalue)
+                        self.grid.SetCellValue(curr_row, col, val)
                         col += 1
+                else:
+                    print "wtf"
 
-                    curr_row += 1
+                curr_row += 1
                     
             self.grid.AutoSizeColumns(true)
+
+# old way
+##
+##                for obj_id, obj in collection_dict.items():
+##                    if obj_id in displayed_fields:
+##                        if isinstance(obj, types.StringType):
+##                            self.grid.SetCellValue(curr_row, 0, obj_id)
+##                            self.grid.SetCellValue(curr_row, 1, str(obj))
+##                            curr_row += 1
+##                        else:
+##                            for attr, value in obj.__dict__.items():
+##                                try:
+##                                    if value.__class__.__name__ in COMPLEX_CLASS_TYPES:
+##                                        val = value.getPrettyDocType()
+##                                    else:
+##                                        print attr, "value type", type(value)
+##                                        val = str(value)
+##                                except:
+##                                    val = str(value)
+##                                self.grid.SetCellValue(curr_row, displayed_fields.index(attr), val)
+##                        curr_row += 1
+##            else:
+##                print "no key"
+##                if self.grid.GetNumberCols() > 0:
+##                    self.grid.DeleteCols(0, self.grid.GetNumberCols())
+                
+##                col = 0
+##                maxcols = 0
+##                # how many columns should there be?
+##                for obj_id, obj in collection_dict.items():
+##                    if hasattr(obj, "__dict__"):
+##                        curr_cols = len(obj.__dict__)
+##                        if curr_cols > maxcols:
+##                            maxcols = curr_cols
+##                    elif isinstance(obj, types.StringType):
+##                        maxcols = 2
+##                    else:
+##                        print "dbbrowser.fillgrid: only objects", selection
+##                        return
+                    
+##                if self.grid.GetNumberCols() > 0:
+##                    self.grid.DeleteCols(0, self.grid.GetNumberCols())
+##                self.grid.AppendCols(maxcols)
+##                for col in range(maxcols):
+##                     self.grid.SetColLabelValue(col, str(col + 1))
+
+##                obj_keys = collection_dict.keys()
+##                obj_keys.sort()
+##                for obj_key in obj_keys:
+##                    obj = collection_dict[obj_key]
+##                    col = 0
+##                    if hasattr(obj, "__dict__"):
+##                        print "class object"
+##                        attr_keys = obj.__dict__.keys()
+##                        attr_keys.sort()
+##                        for attr_key in attr_keys:
+##                            value = obj.__dict__[attr_key]
+##                            try:
+##                                if value.__class__.__name__ in COMPLEX_CLASS_TYPES:
+##                                    val = value.getPrettyDocType()
+##                                else:
+##                                    val = str(value)
+##                            except:
+##                                print "oops", attr_key
+##                                val = str(value)
+
+##                            self.grid.SetCellValue(curr_row, col, val)
+
+##                            if curr_row == 0:
+##                                col_label = attr_key.replace("_", " ").title().strip()
+##                                self.grid.SetColLabelValue(col, col_label)
+##                            col += 1
+
+##                    elif isinstance(obj, types.StringType):
+##                        print "string"
+##                        self.grid.SetCellValue(curr_row, 0, str(obj_key))
+##                        self.grid.SetCellValue(curr_row, 1, str(obj))
+
+##                        if curr_row == 0:
+##                            self.grid.SetColLabelValue(0, "Id")
+##                            self.grid.SetColLabelValue(1, "Value")
+##                        col += 1
+##                    else:
+##                        print "wtf"
+
+##                    curr_row += 1
+                    
+##            self.grid.AutoSizeColumns(true)
 
 
 

Index: PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py
diff -u PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.6 PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.7
--- PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.6	Fri Mar  5 16:18:10 2004
+++ PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py	Mon Apr  5 15:41:20 2004
@@ -130,7 +130,7 @@
 
     item24 = wxFlexGridSizer( 0, 1, 2, 0 )
     
-    item26 = wxStaticBox( parent, -1, "Components" )
+    item26 = wxStaticBox( parent, -1, "Parts/Models" )
     item25 = wxStaticBoxSizer( item26, wxVERTICAL )
     
     item27 = wxStaticText( parent, NAMECODE_LABEL, "Name", wxDefaultPosition, wxDefaultSize, 0 )
@@ -142,7 +142,7 @@
     item28.Enable(False)
     item25.AddWindow( item28, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 )
 
-    item29 = wxStaticText( parent, PARTNAME_LABEL, "Nomenclature", wxDefaultPosition, wxDefaultSize, 0 )
+    item29 = wxStaticText( parent, PARTNAME_LABEL, "Description", wxDefaultPosition, wxDefaultSize, 0 )
     item25.AddWindow( item29, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
 
     item30 = wxTextCtrl( parent, ID_TEXTCTRL_SEARCH_PART_NAME, "", wxDefaultPosition, wxSize(200,-1), 0 )

Index: PanGalactic/pangalactic/client/modules/psm/searchframe.py
diff -u PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.32 PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.33
--- PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.32	Tue Mar 23 14:32:19 2004
+++ PanGalactic/pangalactic/client/modules/psm/searchframe.py	Mon Apr  5 15:41:20 2004
@@ -135,10 +135,13 @@
         docndx = self.fillResultGrid(searchresults, self.docgrid, "Document")
             
         if partndx + modelndx + docndx > 0:
-            # select the search results tab 
             self.summarygrid.BeginBatch()
             self.summarygrid.ClearGrid()
+            gridrows = self.summarygrid.GetNumberRows()
+            if gridrows > 0:
+                self.summarygrid.DeleteRows(0, gridrows)
             rowndx = 0
+
             if partndx > 0:
                 self.summarygrid.AppendRows(1)
                 self.summarygrid.SetCellValue(rowndx, 0, "Part")

Index: PanGalactic/pangalactic/utils/xmlrpcinterface.py
diff -u PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.46 PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.47
--- PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.46	Mon Mar 15 16:47:39 2004
+++ PanGalactic/pangalactic/utils/xmlrpcinterface.py	Mon Apr  5 15:41:21 2004
@@ -3,10 +3,10 @@
 """
 PanGalactic Client XML-RPC Interfaces
 
-@version: $Revision: 1.46 $
+@version: $Revision: 1.47 $
 """
 
-__version__ = "$Revision: 1.46 $"[11:-2]
+__version__ = "$Revision: 1.47 $"[11:-2]
 
 import xmlrpclib
 import types
@@ -245,7 +245,7 @@
         @type class_attr_dict: dictionary
         @param class_attr_dict: looks like {classname:(attrname, attrvalue, comparator),}
         """
-        print "xmlrpcinterface.search"
+        print "xmlrpcinterface.search", class_attr_dict
         if localobjs == None:
             localobjs = []
         retlist = []
@@ -254,6 +254,7 @@
             print " ", classname, attrlist
             data = self._RPC.search(classname, 1, 0, attrlist)
             if data:
+                print "have data"
                 objlist, localobjs = self._factory.rememberAll(data, localobjs)
                 for obj in objlist:
                     if obj.__class__.__name__ == classname:

From pbear at ned.gsfc.nasa.gov  Wed Apr  7 12:11:52 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Wed Apr  7 12:11:55 2004
Subject: [Pangalactic-commits] fixed search versions, partslists, documents;
	more db browser fixes
Message-ID: <200404071611.i37GBqtv031748@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/client/fnord.py 1.88 1.89
PanGalactic/pangalactic/client/modules/psm/itemsearchform.py 1.19 1.20
PanGalactic/pangalactic/client/modules/psm/itemsearchform.wdr 1.7 1.8
PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py 1.7 1.8
PanGalactic/pangalactic/client/modules/psm/psmtool.py 1.157 1.158
PanGalactic/pangalactic/client/modules/psm/searchframe.py 1.33 1.34
PanGalactic/pangalactic/utils/datamanager.py 1.93 1.94
PanGalactic/pangalactic/utils/dbbrowser.py 1.14 1.15
PanGalactic/pangalactic/utils/localdb.py 1.74 1.75
PanGalactic/pangalactic/utils/xmlrpcinterface.py 1.47 1.48

Log message:
fixed search versions, partslists, documents; more db browser fixes


Index: PanGalactic/pangalactic/utils/dbbrowser.py
diff -u PanGalactic/pangalactic/utils/dbbrowser.py:1.14 PanGalactic/pangalactic/utils/dbbrowser.py:1.15
--- PanGalactic/pangalactic/utils/dbbrowser.py:1.14	Mon Apr  5 15:41:21 2004
+++ PanGalactic/pangalactic/utils/dbbrowser.py	Wed Apr  7 12:11:50 2004
@@ -194,6 +194,7 @@
             if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
                 self.current_config = self.dbroot[DISPLAY_CONFIG]
 
+            displayed_fields = []
             if self.current_config.has_key(selection) and (len(self.current_config[selection]) > 0):
                 # there is an entry in the configuration dictionary
                 mapping = self.current_config[selection]

Index: PanGalactic/pangalactic/utils/datamanager.py
diff -u PanGalactic/pangalactic/utils/datamanager.py:1.93 PanGalactic/pangalactic/utils/datamanager.py:1.94
--- PanGalactic/pangalactic/utils/datamanager.py:1.93	Wed Mar 31 16:17:20 2004
+++ PanGalactic/pangalactic/utils/datamanager.py	Wed Apr  7 12:11:50 2004
@@ -1,6 +1,6 @@
 # $Source: /repo/step_testbed/PanGalactic/pangalactic/utils/datamanager.py,v $
 
-__version__ = "$Revision: 1.93 $"[11:-2]
+__version__ = "$Revision: 1.94 $"[11:-2]
 
 
 import time
@@ -120,14 +120,14 @@
         self.State = state
 
     def saveState(self, state):
-        print "dm.savestate", state.pgef_oid
+        #print "dm.savestate", state.pgef_oid
         self.localDB.SaveState(state)
 
     def getPasswd(self, pwd_id):
         return self.localDB.getPasswd(pwd_id)
 
     def changePassword(self, login_pwd, new_pwd):
-        print "update local passwds"
+        #print "update local passwds"
         self.server.changePassword(new_pwd)
         self.login(self.user.id, new_pwd)
 
@@ -139,7 +139,7 @@
         return self.localDB.getDict(self.localDB.ROLE)
     
     def saveRoles(self, roles):
-        print "dm.saveroles"
+        #print "dm.saveroles"
         self.localDB.SaveRoles(roles)
 
     def getUsers(self):
@@ -149,7 +149,7 @@
         return self.localDB.getUser(self.localDB.USER, userid)
 
     def saveUser(self, user):
-        self.localDB.Save([user], True)
+        self.localDB.SaveUser(user)
 
     def newObject(self, classname):
         #print "dm.newobject"
@@ -791,7 +791,7 @@
                    oid = obj.pgef_oid,
                    mimetype = ctype)
 
-            print "uploaded\n"
+            print "uploaded"
         else:
             print obj.__class__.__name__ + \
                   "(" + obj._local_file_name + ") does not exist"

Index: PanGalactic/pangalactic/client/fnord.py
diff -u PanGalactic/pangalactic/client/fnord.py:1.88 PanGalactic/pangalactic/client/fnord.py:1.89
--- PanGalactic/pangalactic/client/fnord.py:1.88	Wed Mar 31 16:17:19 2004
+++ PanGalactic/pangalactic/client/fnord.py	Wed Apr  7 12:11:49 2004
@@ -1,13 +1,13 @@
 #!/usr/bin/env python 
 
-# $Id: fnord.py,v 1.88 2004/03/31 21:17:19 pbear Exp $
+# $Id: fnord.py,v 1.89 2004/04/07 16:11:49 pbear Exp $
 
 """
 Main application module for the PGEF desktop client.
 
-@version: $Revision: 1.88 $
+@version: $Revision: 1.89 $
 """
-__version__ = "$Revision: 1.88 $"[11:-2]
+__version__ = "$Revision: 1.89 $"[11:-2]
 
 from wxPython.wx import *
 from wxPython.grid import *
@@ -541,14 +541,14 @@
     def onPasswd(self, event):
         login_passwd = self.dm.getPasswd("login")
         curr_passwd = self.dm.getPasswd("current")
-        print "passwd", login_passwd, curr_passwd
+        #print "passwd", login_passwd, curr_passwd
         dlg = ChangePasswd(self, -1, "Change Password")
         dlg.CentreOnParent()
         
         still_trying = True
         while still_trying:
             if dlg.ShowModal() == wxID_OK:
-                print "passwds", dlg.getOldPasswd(), dlg.getNewPasswd(), dlg.getConfirmPasswd()
+                #print "passwds", dlg.getOldPasswd(), dlg.getNewPasswd(), dlg.getConfirmPasswd()
 
                 if dlg.getOldPasswd() == curr_passwd and \
                     dlg.getNewPasswd() == dlg.getConfirmPasswd():
@@ -636,7 +636,7 @@
 
 
     def OnDBBrowser(self, event):
-        print "fnord.ondbbrowser"
+        #print "fnord.ondbbrowser"
         tmpsize = wxSize(750, 500)
         dbb_frame = toolframe.toolFrame(self, -1, 'Local Database Browser', wxDefaultPosition, tmpsize)
         dbb_frame.menuBar.SetLabel(toolframe.ID_FILE_EXIT, '&Close')
@@ -903,7 +903,7 @@
                 dlg.Destroy()
 
     def ActivateTool(self):
-        print "fnord.activatetool", self.State
+        #print "fnord.activatetool", self.State
         if self.psmtool and self.psmtool.IsShown():
             return
             
@@ -921,7 +921,7 @@
         
         
     def InitializeTool(self):
-        print "fnord.initializetool", self.State
+        #print "fnord.initializetool", self.State
         tbh = self.GetToolBar().GetSizeTuple()[1]
         pos = wxPoint (0, tbh)
 

Index: PanGalactic/pangalactic/client/modules/psm/psmtool.py
diff -u PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.157 PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.158
--- PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.157	Wed Mar 31 16:17:19 2004
+++ PanGalactic/pangalactic/client/modules/psm/psmtool.py	Wed Apr  7 12:11:50 2004
@@ -9,7 +9,7 @@
 This module is the main application code for the pgef client interface
 """
 
-__version__ = "$Revision: 1.157 $"[11:-2]
+__version__ = "$Revision: 1.158 $"[11:-2]
 
 
 import os
@@ -97,7 +97,6 @@
         self.Parent = parent
         self.dm = datamgr
         self.State = state
-        print "psmtool.init", self.State.pgef_oid
 
         self.itemeditform = None
         self.SearchFrame = None
@@ -516,7 +515,7 @@
 
 
     def OnNewPartsList(self):
-        print "psmtool.onnewparts"
+        #print "psmtool.onnewparts"
         #print "currentproject", self.State.currentprojectname, self.State.currentproject
         foo = partslisttreeframe.PartsListTreeFrame(self.Parent, self.State, self.dm)
         foo.SecureMode()
@@ -526,7 +525,7 @@
         
 
     def OnNewDoc(self):
-        print "psmtool.onnewdoc", self.State.currentprojectname
+        #print "psmtool.onnewdoc", self.State.currentprojectname
         foo = documenttreeframe.DocumentTreeFrame(self.Parent, self.State, self.dm)
         foo.SecureMode()
         foo.SetMode(doctreeframe.NEW_MODE)

Index: PanGalactic/pangalactic/client/modules/psm/searchframe.py
diff -u PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.33 PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.34
--- PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.33	Mon Apr  5 15:41:20 2004
+++ PanGalactic/pangalactic/client/modules/psm/searchframe.py	Wed Apr  7 12:11:50 2004
@@ -34,7 +34,7 @@
 
         # criteria page
         self.searchform = itemsearchform.ItemSearchForm(self.searchnb, -1)
-        self.searchform.GetComboProject().SetSelection(0)
+        self.searchform.GetProjectWgt().SetSelection(0)
         self.searchnb.AddPage(self.searchform, "Criteria")
 
         # summary page - show this page after a successful search
@@ -94,11 +94,11 @@
         self.docgrid.GetGridWindow().SetToolTip(wxToolTip(grid_tooltip))
         self.searchnb.AddPage(self.docgrid, "Documents")
 
-        self.searchform.FillProjectCombo(self.dm.projects)
-        self.searchform.GetComboProject().SetSelection(0)
+        self.searchform.FillProjectWgt(self.dm.projects)
+        self.searchform.GetProjectWgt().SetSelection(0)
 
-        EVT_BUTTON(self, self.searchform.GetButtonSearch().GetId(), self.onSearch)
-        EVT_BUTTON(self, self.searchform.GetButtonClear().GetId(), self.onClear)
+        EVT_BUTTON(self, self.searchform.GetSearchWgt().GetId(), self.onSearch)
+        EVT_BUTTON(self, self.searchform.GetClearWgt().GetId(), self.onClear)
         EVT_MENU(self,self.SEARCH_GETMYSTUFF, self.GetMyStuff)
         
 
@@ -229,9 +229,9 @@
         """
         Search the database for objects satisfying the search criteria.
         """
-        print "\nsearchframe.onsearch"
+        #print "\nsearchframe.onsearch"
         searchattrlist = self.searchform.getSearchCriteria()
-        print "searchattrlist", searchattrlist
+        #print "searchattrlist", searchattrlist
 
         if len(searchattrlist) == 0:
             # at least one field parameter must have a searchable value

Index: PanGalactic/pangalactic/client/modules/psm/itemsearchform.py
diff -u PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.19 PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.20
--- PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.19	Mon Apr  5 15:41:20 2004
+++ PanGalactic/pangalactic/client/modules/psm/itemsearchform.py	Wed Apr  7 12:11:50 2004
@@ -11,213 +11,240 @@
         wxPanel.__init__(self, parent, id, pos, size, style)
         ItemSearchFunc(self, true)
 
-        EVT_CHECKBOX(self, SEARCHITEM_CHECKBOX, self.OnCheckItem)
+        # initial settings for search criteria
+        self.GetPLFlagWgt().Enable(True)
+        self.GetDocFlagWgt().Enable(True)
+        self.GetModelFlagWgt().Enable(True)
+        self.GetPartFlagWgt().Enable(True)
+
+        self.GetPartFlagWgt().SetValue(True)
+        self.OnCheckPart()
+
+        self.GetModelFlagWgt().SetValue(False)
+        self.OnCheckModel()
+
+        self.GetPLFlagWgt().SetValue(False)
+        self.OnCheckPL()
+
+        # these are not yet implemented
+        self.GetAdvancedWgt().Enable(False)
+
+        EVT_CHECKBOX(self, SEARCHPART_CHECKBOX, self.OnCheckPart)
+        EVT_CHECKBOX(self, SEARCHMODEL_CHECKBOX, self.OnCheckModel)
         EVT_CHECKBOX(self, SEARCHPL_CHECKBOX, self.OnCheckPL)
         EVT_CHECKBOX(self, SEARCHDOC_CHECKBOX, self.OnCheckDoc)
 
-        # delete the code below when searching for partslists and documents works
-        self.GetButtonAdvanced().Enable(false)
-        self.GetCheckPL().Enable(false)
-        self.GetCheckDoc().Enable(false)
-        self.GetRadioVersion().Enable(false)
-        self.GetCheckItem().SetValue(true)
-        self.GetTextctrlAuthor().Enable(false)
-        self.GetTextAuthorLabel().Enable(false)
-        self.GetTextctrlNameCode().Enable(true)
-        self.GetTextctrlPartName().Enable(true)
-        self.GetTextNameCodeLabel().Enable(true)
-        self.GetTextPartNameLabel().Enable(true)
-#        self.GetTextIdentifierLabel().Enable(false)
-#        self.GetTextctrlIdentifier().Enable(false)
 
-        # WDR: handler declarations for ItemSearchForm
-        
+    def GetSearchWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_BUTTON), "wxButton" )
 
-    # WDR: methods for ItemSearchForm
-    
-    def GetButtonSearch(self):
-        return wxPyTypeCast( self.FindWindowById(ID_BUTTON_SEARCH), "wxButton" )
+    def GetClearWgt(self):
+        return wxPyTypeCast(self.FindWindowById(CLEAR_BUTTON), "wxButton" )
+
+    def GetAdvancedWgt(self):
+        return wxPyTypeCast(self.FindWindowById(ADVSEARCH_BUTTON), "wxButton" )
 
-    def GetButtonClear(self):
-        return wxPyTypeCast( self.FindWindowById(ID_BUTTON_CLEAR), "wxButton" )
+    def GetPOCWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_POC), "wxTextCtrl")
 
-    def GetButtonAdvanced(self):
-        return wxPyTypeCast( self.FindWindowById(ID_BUTTON_ADVSEARCH), "wxButton" )
+    def GetAuthorWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_AUTHOR), "wxTextCtrl")
 
-    def GetTextctrlPOC(self):
-        return wxPyTypeCast(self.FindWindowById(ID_TEXTCTRL_SEARCH_POC), "wxTextCtrl")
+    def GetPartNameWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_PARTNAME), "wxTextCtrl")
 
-    def GetTextctrlAuthor(self):
-        return wxPyTypeCast(self.FindWindowById(ID_TEXTCTRL_SEARCH_AUTHOR), "wxTextCtrl")
+    def GetPartDescWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_PARTDESC), "wxTextCtrl")
 
-    def GetTextctrlNameCode(self):
-        return wxPyTypeCast(self.FindWindowById(ID_TEXTCTRL_SEARCH_NAME_CODE), "wxTextCtrl")
+    def GetModelNameWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_MODELNAME), "wxTextCtrl")
 
-    def GetTextctrlIdentifier(self):
-        return wxPyTypeCast(self.FindWindowById(ID_TEXTCTRL_SEARCH_IDENTIFIER), "wxTextCtrl")
+    def GetModelDescWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_MODELDESC), "wxTextCtrl")
 
-    def GetTextctrlCategory(self):
-        return wxPyTypeCast(self.FindWindowById(ID_TEXTCTRL_SEARCH_CATEGORY), "wxTextCtrl")
+    def GetCategoryWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_CATEGORY), "wxTextCtrl")
 
-    def GetTextctrlTitle(self):
-        return wxPyTypeCast(self.FindWindowById(ID_TEXTCTRL_SEARCH_DOCTITLE), "wxTextCtrl")
+    def GetPLTypeWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_PLTYPE), "wxComboBox")
 
-    def GetTextctrlPartName(self):
-        return wxPyTypeCast(self.FindWindowById(ID_TEXTCTRL_SEARCH_PART_NAME), "wxTextCtrl")
+    def GetTitleWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_DOCTITLE), "wxTextCtrl")
 
-    def GetComboPLType(self):
-        return wxPyTypeCast(self.FindWindowById(ID_COMBO_SEARCH_PLTYPE), "wxComboBox")
+    def GetDocTypeWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_DOCTYPE), "wxComboBox")
 
-    def GetComboDocType(self):
-        return wxPyTypeCast(self.FindWindowById(ID_COMBO_SEARCH_DOCTYPE), "wxComboBox")
+    def GetProjectWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCH_PROJECT), "wxComboBox")
 
-    def GetComboProject(self):
-        return wxPyTypeCast(self.FindWindowById(ID_COMBO_SEARCH_PROJECT), "wxComboBox")
+    def GetPartFlagWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCHPART_CHECKBOX), "wxCheckBox")
 
-    def GetCheckItem(self):
-        return wxPyTypeCast(self.FindWindowById(SEARCHITEM_CHECKBOX), "wxCheckBox")
+    def GetModelFlagWgt(self):
+        return wxPyTypeCast(self.FindWindowById(SEARCHMODEL_CHECKBOX), "wxCheckBox")
 
-    def GetCheckPL(self):
+    def GetPLFlagWgt(self):
         return wxPyTypeCast(self.FindWindowById(SEARCHPL_CHECKBOX), "wxCheckBox")
 
-    def GetCheckDoc(self):
+    def GetDocFlagWgt(self):
         return wxPyTypeCast(self.FindWindowById(SEARCHDOC_CHECKBOX), "wxCheckBox")
 
-    def GetRadioVersion(self):
+    def GetVersionRadioWgt(self):
         return wxPyTypeCast(self.FindWindowById(SEARCHVERSION_RADIOBOX), "wxRadioBox")
 
-    def GetTextPLTypeLabel(self):
+    def GetRevisionWgt(self):
+        return wxPyTypeCast(self.FindWindowById(REVISION_LABEL), "wxTextCtrl")
+
+    def GetPLTypeLabel(self):
         return wxPyTypeCast(self.FindWindowById(PLTYPE_LABEL), "wxStaticText")
 
-    def GetTextDocTypeLabel(self):
+    def GetDocTypeLabel(self):
         return wxPyTypeCast(self.FindWindowById(DOCTYPE_LABEL), "wxStaticText")
 
-    def GetTextPartNameLabel(self):
+    def GetPartNameLabel(self):
         return wxPyTypeCast(self.FindWindowById(PARTNAME_LABEL), "wxStaticText")
 
-    def GetTextCategoryLabel(self):
+    def GetPartDescLabel(self):
+        return wxPyTypeCast(self.FindWindowById(PARTDESC_LABEL), "wxStaticText")
+
+    def GetModelNameLabel(self):
+        return wxPyTypeCast(self.FindWindowById(MODELNAME_LABEL), "wxStaticText")
+
+    def GetModelDescLabel(self):
+        return wxPyTypeCast(self.FindWindowById(MODELDESC_LABEL), "wxStaticText")
+
+    def GetCategoryLabel(self):
         return wxPyTypeCast(self.FindWindowById(CATEGORY_LABEL), "wxStaticText")
 
-    def GetTextTitleLabel(self):
+    def GetTitleLabel(self):
         return wxPyTypeCast(self.FindWindowById(TITLE_LABEL), "wxStaticText")
 
-    def GetTextNameCodeLabel(self):
-        return wxPyTypeCast(self.FindWindowById(NAMECODE_LABEL), "wxStaticText")
-
-    def GetTextAuthorLabel(self):
+    def GetAuthorLabel(self):
         return wxPyTypeCast(self.FindWindowById(AUTHOR_LABEL), "wxStaticText")
 
-    def GetTextIdentifierLabel(self):
-        return wxPyTypeCast(self.FindWindowById(IDENTIFIER_LABEL), "wxStaticText")
+    def GetRevisionLabel(self):
+        return wxPyTypeCast(self.FindWindowById(REVISION_LABEL), "wxStaticText")
+
 
-    def OnCheckItem(self, event):
-        wgt = self.GetCheckItem()
-        self.GetTextNameCodeLabel().Enable(wgt.GetValue())
-#        self.GetTextItemTypeLabel().Enable(wgt.GetValue())
-        self.GetTextctrlNameCode().Enable(wgt.GetValue())
-#        self.GetComboItemType().Enable(wgt.GetValue())
-
-    def OnCheckPL(self, event):
-        wgt = self.GetCheckPL()
-        self.GetTextCategoryLabel().Enable(wgt.GetValue())
-        self.GetTextPLTypeLabel().Enable(wgt.GetValue())
-        self.GetTextctrlCategory().Enable(wgt.GetValue())
-        self.GetComboPLType().Enable(wgt.GetValue())
-
-    def OnCheckDoc(self, event):
-        wgt = self.GetCheckDoc()
-        self.GetTextTitleLabel().Enable(wgt.GetValue())
-        self.GetTextDocTypeLabel().Enable(wgt.GetValue())
-        self.GetTextctrlTitle().Enable(wgt.GetValue())
-        self.GetComboDocType().Enable(wgt.GetValue())
+    def OnCheckPart(self, event = None):
+        wgt = self.GetPartFlagWgt()
+        self.GetPartNameLabel().Enable(wgt.GetValue())
+        self.GetPartNameWgt().Enable(wgt.GetValue())
+        self.GetPartDescLabel().Enable(wgt.GetValue())
+        self.GetPartDescWgt().Enable(wgt.GetValue())
+
+    def OnCheckModel(self, event = None):
+        wgt = self.GetModelFlagWgt()
+        self.GetModelNameLabel().Enable(wgt.GetValue())
+        self.GetModelNameWgt().Enable(wgt.GetValue())
+        self.GetModelDescLabel().Enable(wgt.GetValue())
+        self.GetModelDescWgt().Enable(wgt.GetValue())
+
+    def OnCheckPL(self, event = None):
+        wgt = self.GetPLFlagWgt()
+        self.GetCategoryLabel().Enable(wgt.GetValue())
+        self.GetPLTypeLabel().Enable(wgt.GetValue())
+        self.GetCategoryWgt().Enable(wgt.GetValue())
+        self.GetPLTypeWgt().Enable(wgt.GetValue())
+
+    def OnCheckDoc(self, event = None):
+        wgt = self.GetDocFlagWgt()
+        self.GetTitleLabel().Enable(wgt.GetValue())
+        self.GetDocTypeLabel().Enable(wgt.GetValue())
+        self.GetTitleWgt().Enable(wgt.GetValue())
+        self.GetDocTypeWgt().Enable(wgt.GetValue())
     
     def ClearForm(self):
-        self.GetTextctrlAuthor().SetValue('')
-        self.GetTextctrlPOC().SetValue('')
-        self.GetTextctrlIdentifier().SetValue('')
-        self.GetTextctrlNameCode().SetValue('')
-        self.GetTextctrlPOC().SetValue('')
-        self.GetComboPLType().SetValue('')
-        self.GetComboPLType().SetSelection(0)        
-        self.GetComboDocType().SetValue('')
-        self.GetComboDocType().SetSelection(0)        
-        self.GetTextctrlPartName().SetValue('')
-        self.GetComboProject().SetValue('')
-        self.GetComboProject().SetSelection(0)
+        self.GetAuthorWgt().SetValue("")
+        self.GetPOCWgt().SetValue("")
+        self.GetRevisionWgt().SetValue("")
+        self.GetPartNameWgt().SetValue("")
+        self.GetPartDescWgt().SetValue("")
+        self.GetModelNameWgt().SetValue("")
+        self.GetModelDescWgt().SetValue("")
+
+        self.GetPLTypeWgt().SetValue("")
+        self.GetPLTypeWgt().SetSelection(0)        
+        self.GetDocTypeWgt().SetValue("")
+        self.GetDocTypeWgt().SetSelection(0)        
+        self.GetProjectWgt().SetValue("")
+        self.GetProjectWgt().SetSelection(0)
 
 
     def getSearchCriteria(self):
-        fieldcount = 0
+        print "itemsearchform.getsearchcriteria"
+        classnames = ["Part", "Model", "PartsList", "Document"]
         classattrdict = {}
-        classnames = ["Part", "Model"]
         fields = []
+        fieldlist = []
 
-        field = self.GetTextctrlPOC().GetValue()
-        if field == None or len(field) == 0:
-            field = ""
-        else:
-            fieldcount += 1
-            fields.append(("owner_oid", field))#, LIKE_STR))  # there is currently a bug in search.
-                                                           # when it's fixed, put the comparators back
-
-        field = self.GetTextctrlPartName().GetValue()
-        if field == None or len(field) == 0:
-            field = ""
-        else:
-            fieldcount += 1
-            fields.append(("short_description", field))#, LIKE_STR))
-
-        field = self.GetTextctrlIdentifier().GetValue()
-        if field == None or len(field) == 0:
-            field = ""
-        else:
-            fieldcount += 1
-            fields.append(("id", field))#, LIKE_STR))
-
-        field = self.GetTextctrlNameCode().GetValue()
-        if field == None or len(field) == 0:
-            field = ""
-        else:
-            fieldcount += 1
-            fields.append(("name", field))#, LIKE_STR))
-
-        field = self.GetTextctrlAuthor().GetValue()
-        if field == None or len(field) == 0:
-            field = ""
-        else:
-            fieldcount += 1
-            fields.append(("creator_oid", field))#, LIKE_STR))
-
-        field = self.GetComboProject().GetValue()
-        if field == None or len(field) == 0 or field == "Any":
-            field = ""
-        else:
-            fieldcount += 1
+        # the list of fields to check
+        fields.append(("all",       "owner_oid",    self.GetPOCWgt().GetValue()))
+        fields.append(("all",       "creator_oid",  self.GetAuthorWgt().GetValue()))
+        fields.append(("Part",      "id",           self.GetPartNameWgt().GetValue()))
+        fields.append(("Part",      "name",         self.GetPartDescWgt().GetValue()))
+        fields.append(("Model",     "id",           self.GetModelNameWgt().GetValue()))
+        fields.append(("Model",     "name",         self.GetModelDescWgt().GetValue()))
+        fields.append(("PartsList", "category",     self.GetCategoryWgt().GetValue()))
+        fields.append(("PartsList", "type",         self.GetPLTypeWgt().GetValue()))
+        fields.append(("Document",  "name",         self.GetTitleWgt().GetValue()))
+        fields.append(("Document",  "doc_type_oid", self.GetDocTypeWgt().GetValue()))
+
+        # check for any non-empty/non-blank fields
+        for classname, label, field in fields:
+            if field <> None and len(field.strip()) > 0:
+                fieldlist.append((classname, label, field))
+
+        # project is a special case, due to the "any"
+        field = self.GetProjectWgt().GetValue()
+        if field <> None and len(field.strip()) > 0 and field <> "Any":
             id_context = field.split(" (")
-            fields.append(("project_oid", id_context[0]))#, LIKE_STR))
+            fieldlist.append(("all", "project_oid", id_context[0]))
+
+        # set the criteria by class
+        if len(fieldlist) > 0:
+            # version is a special case;
+            # by itself, it doesn't count as a field
+            # only apply it if there is some other criterion selected
+            field = self.GetVersionRadioWgt().GetSelection()
+            if field == 1:
+                head_flag = 0
+            else:
+                head_flag = 1
 
-        if fieldcount > 0:
             for classname in classnames:
-                classattrdict[classname] = fields
+                classattrdict[classname] = []
+                
+            for classname, label, field in fieldlist:
+                if classname == "all":
+                    for cname in classnames:
+                        classattrdict[cname].append((label, field))
+                else:
+                    classattrdict[classname].append((label, field))
+
+            for classname, fields in classattrdict.items():
+                if len(fields) > 0:
+                    if head_flag:
+                        classattrdict[classname].append(("head_flag", head_flag))
+                else:
+                    del classattrdict[classname]
+                    
         return classattrdict
         
-
+        
     def PrepareQueryItem(self):
         print "WARNING: itemsearchform.prepareQueryItem is deprecated; use getSearchCriteria"
         return None
     
 
-    def FillProjectCombo(self, ProjectList):
-        """Fills the Project combo box, assumes that the project list is passed in"""
-
-        #print "itemsearchform.fillprojectcombo"
-        #print "ProjectList", ProjectList
-        self.GetComboProject().Clear()
-        self.GetComboProject().SetValue('')
+    def FillProjectWgt(self, ProjectList):
+        """Fills the Project wgt, assumes that the project list is passed in"""
+        self.GetProjectWgt().Clear()
+        self.GetProjectWgt().SetValue("")
         projectlist = []
         for pkey, project in ProjectList.items():
             projectlist.append(project.id + " (" + project.id_context + ")")
         projectlist.sort()
-        self.GetComboProject().Append('Any')
+        self.GetProjectWgt().Append("Any")
         for id_and_context in projectlist:
-            self.GetComboProject().Append(id_and_context)
+            self.GetProjectWgt().Append(id_and_context)

Index: PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py
diff -u PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.7 PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.8
--- PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.7	Mon Apr  5 15:41:20 2004
+++ PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py	Wed Apr  7 12:11:50 2004
@@ -11,194 +11,237 @@
 
 # Window functions
 
-ID_TEXT = wxNewId()
-ID_COMBO_SEARCH_PROJECT = wxNewId()
-IDENTIFIER_LABEL = wxNewId()
-ID_TEXTCTRL_SEARCH_IDENTIFIER = wxNewId()
-AUTHOR_LABEL = wxNewId()
-ID_TEXTCTRL_SEARCH_AUTHOR = wxNewId()
-ID_TEXTCTRL_SEARCH_POC = wxNewId()
-SEARCHITEM_CHECKBOX = wxNewId()
+SEARCHPART_CHECKBOX = wxNewId()
+SEARCHMODEL_CHECKBOX = wxNewId()
 SEARCHPL_CHECKBOX = wxNewId()
 SEARCHDOC_CHECKBOX = wxNewId()
 SEARCHVERSION_RADIOBOX = wxNewId()
-ID_BUTTON_SEARCH = wxNewId()
-ID_BUTTON_ADVSEARCH = wxNewId()
-ID_BUTTON_CLEAR = wxNewId()
-ID_LINE = wxNewId()
-NAMECODE_LABEL = wxNewId()
-ID_TEXTCTRL_SEARCH_NAME_CODE = wxNewId()
+ID_TEXT = wxNewId()
+SEARCH_PROJECT = wxNewId()
+REVISION_LABEL = wxNewId()
+SEARCH_REVISION = wxNewId()
+AUTHOR_LABEL = wxNewId()
+SEARCH_AUTHOR = wxNewId()
+SEARCH_POC = wxNewId()
+SEARCH_BUTTON = wxNewId()
+ADVSEARCH_BUTTON = wxNewId()
+CLEAR_BUTTON = wxNewId()
 PARTNAME_LABEL = wxNewId()
-ID_TEXTCTRL_SEARCH_PART_NAME = wxNewId()
+SEARCH_PARTNAME = wxNewId()
+PARTDESC_LABEL = wxNewId()
+SEARCH_PARTDESC = wxNewId()
+MODELNAME_LABEL = wxNewId()
+SEARCH_MODELNAME = wxNewId()
+MODELDESC_LABEL = wxNewId()
+SEARCH_MODELDESC = wxNewId()
 CATEGORY_LABEL = wxNewId()
-ID_TEXTCTRL_SEARCH_CATEGORY = wxNewId()
+SEARCH_CATEGORY = wxNewId()
 PLTYPE_LABEL = wxNewId()
-ID_COMBO_SEARCH_PLTYPE = wxNewId()
+SEARCH_PLTYPE = wxNewId()
 TITLE_LABEL = wxNewId()
-ID_TEXTCTRL_SEARCH_DOCTITLE = wxNewId()
+SEARCH_DOCTITLE = wxNewId()
 DOCTYPE_LABEL = wxNewId()
-ID_COMBO_SEARCH_DOCTYPE = wxNewId()
+SEARCH_DOCTYPE = wxNewId()
 
 def ItemSearchFunc( parent, call_fit = True, set_sizer = True ):
-    item0 = wxFlexGridSizer( 0, 6, 0, 0 )
+    item0 = wxFlexGridSizer( 0, 2, 0, 0 )
     item0.AddGrowableCol( 0 )
-    item0.AddGrowableCol( 2 )
-    item0.AddGrowableCol( 4 )
+    item0.AddGrowableCol( 1 )
     item0.AddGrowableRow( 0 )
     
-    item1 = wxFlexGridSizer( 0, 1, 5, 0 )
+    item1 = wxFlexGridSizer( 0, 1, 10, 0 )
     item1.AddGrowableCol( 0 )
     
-    item3 = wxStaticBox( parent, -1, "General" )
-    item2 = wxStaticBoxSizer( item3, wxVERTICAL )
+    item3 = wxStaticBox( parent, -1, "Search For" )
+    item2 = wxStaticBoxSizer( item3, wxHORIZONTAL )
     
-    item4 = wxStaticText( parent, ID_TEXT, "Project", wxDefaultPosition, wxDefaultSize, 0 )
-    item2.AddWindow( item4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
-
-    item5 = wxComboBox( parent, ID_COMBO_SEARCH_PROJECT, "", wxDefaultPosition, wxSize(180,-1), 
-        ["Any"] , wxCB_DROPDOWN )
-    item5.SetToolTip( wxToolTip("Specify a project as part of the search criteria") )
-    item2.AddWindow( item5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
-
-    item6 = wxStaticText( parent, IDENTIFIER_LABEL, "Revision", wxDefaultPosition, wxDefaultSize, 0 )
-    item2.AddWindow( item6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item4 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item4.AddGrowableCol( 0 )
+    item4.AddGrowableCol( 1 )
+    
+    item5 = wxCheckBox( parent, SEARCHPART_CHECKBOX, "Parts", wxDefaultPosition, wxDefaultSize, 0 )
+    item4.AddWindow( item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item7 = wxTextCtrl( parent, ID_TEXTCTRL_SEARCH_IDENTIFIER, "", wxDefaultPosition, wxSize(200,-1), 0 )
-    item7.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
-    item2.AddWindow( item7, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 )
+    item6 = wxCheckBox( parent, SEARCHMODEL_CHECKBOX, "Models", wxDefaultPosition, wxDefaultSize, 0 )
+    item4.AddWindow( item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item8 = wxStaticText( parent, AUTHOR_LABEL, "Author", wxDefaultPosition, wxDefaultSize, 0 )
-    item2.AddWindow( item8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item7 = wxCheckBox( parent, SEARCHPL_CHECKBOX, "Parts lists", wxDefaultPosition, wxDefaultSize, 0 )
+    item4.AddWindow( item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item9 = wxTextCtrl( parent, ID_TEXTCTRL_SEARCH_AUTHOR, "", wxDefaultPosition, wxSize(150,-1), 0 )
-    item9.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
-    item2.AddWindow( item9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
+    item8 = wxCheckBox( parent, SEARCHDOC_CHECKBOX, "Documents", wxDefaultPosition, wxDefaultSize, 0 )
+    item4.AddWindow( item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item10 = wxStaticText( parent, ID_TEXT, "Point of Contact", wxDefaultPosition, wxDefaultSize, 0 )
-    item2.AddWindow( item10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item2.AddSizer( item4, 0, wxGROW|wxALL, 5 )
 
-    item11 = wxTextCtrl( parent, ID_TEXTCTRL_SEARCH_POC, "", wxDefaultPosition, wxSize(200,-1), 0 )
-    item2.AddWindow( item11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
+    item9 = wxRadioBox( parent, SEARCHVERSION_RADIOBOX, "", wxDefaultPosition, wxDefaultSize, 
+        ["Latest Version","All Versions"] , 1, wxRA_SPECIFY_COLS )
+    item2.AddWindow( item9, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 )
 
     item1.AddSizer( item2, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item12 = wxFlexGridSizer( 1, 0, 0, 0 )
-    item12.AddGrowableCol( 0 )
-    item12.AddGrowableCol( 1 )
+    item11 = wxStaticBox( parent, -1, "General" )
+    item10 = wxStaticBoxSizer( item11, wxVERTICAL )
     
-    item14 = wxStaticBox( parent, -1, "Search for" )
-    item13 = wxStaticBoxSizer( item14, wxVERTICAL )
+    item12 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item12.AddGrowableCol( 1 )
     
-    item15 = wxCheckBox( parent, SEARCHITEM_CHECKBOX, "Components", wxDefaultPosition, wxDefaultSize, 0 )
-    item13.AddWindow( item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item13 = wxStaticText( parent, ID_TEXT, "Project", wxDefaultPosition, wxDefaultSize, 0 )
+    item12.AddWindow( item13, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
 
-    item16 = wxCheckBox( parent, SEARCHPL_CHECKBOX, "Parts lists", wxDefaultPosition, wxDefaultSize, 0 )
-    item13.AddWindow( item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item14 = wxComboBox( parent, SEARCH_PROJECT, "", wxDefaultPosition, wxDefaultSize, 
+        ["Any"] , wxCB_DROPDOWN )
+    item14.SetToolTip( wxToolTip("Specify a project as part of the search criteria") )
+    item12.AddWindow( item14, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
 
-    item17 = wxCheckBox( parent, SEARCHDOC_CHECKBOX, "Documents", wxDefaultPosition, wxDefaultSize, 0 )
-    item13.AddWindow( item17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item15 = wxStaticText( parent, REVISION_LABEL, "Revision", wxDefaultPosition, wxDefaultSize, 0 )
+    item12.AddWindow( item15, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
 
-    item12.AddSizer( item13, 0, wxGROW|wxALL, 5 )
+    item16 = wxTextCtrl( parent, SEARCH_REVISION, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item16.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
+    item12.AddWindow( item16, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
 
-    item18 = wxRadioBox( parent, SEARCHVERSION_RADIOBOX, "Search for", wxDefaultPosition, wxDefaultSize, 
-        ["Latest Version","All Versions"] , 1, wxRA_SPECIFY_COLS )
-    item12.AddWindow( item18, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 )
+    item17 = wxStaticText( parent, AUTHOR_LABEL, "Author", wxDefaultPosition, wxDefaultSize, 0 )
+    item12.AddWindow( item17, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+
+    item18 = wxTextCtrl( parent, SEARCH_AUTHOR, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item18.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
+    item12.AddWindow( item18, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
+
+    item19 = wxStaticText( parent, ID_TEXT, "Point of Contact", wxDefaultPosition, wxDefaultSize, 0 )
+    item12.AddWindow( item19, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
 
-    item1.AddSizer( item12, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item20 = wxTextCtrl( parent, SEARCH_POC, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item12.AddWindow( item20, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
 
-    item19 = wxFlexGridSizer( 1, 0, 0, 0 )
-    item19.AddGrowableCol( 0 )
-    item19.AddGrowableCol( 1 )
+    item10.AddSizer( item12, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+
+    item1.AddSizer( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+
+    item21 = wxFlexGridSizer( 1, 0, 0, 0 )
+    item21.AddGrowableCol( 0 )
+    item21.AddGrowableCol( 1 )
+    item21.AddGrowableCol( 2 )
     
-    item20 = wxButton( parent, ID_BUTTON_SEARCH, "Search", wxDefaultPosition, wxDefaultSize, 0 )
-    item20.SetToolTip( wxToolTip("Initiate the search using the specified criteria") )
-    item19.AddWindow( item20, 0, wxALIGN_CENTER|wxALL, 5 )
+    item22 = wxButton( parent, SEARCH_BUTTON, "Search", wxDefaultPosition, wxDefaultSize, 0 )
+    item22.SetToolTip( wxToolTip("Initiate the search using the specified criteria") )
+    item21.AddWindow( item22, 0, wxALIGN_CENTER|wxALL, 5 )
 
-    item21 = wxButton( parent, ID_BUTTON_ADVSEARCH, "Advanced...", wxDefaultPosition, wxDefaultSize, 0 )
-    item19.AddWindow( item21, 0, wxALIGN_CENTER|wxALL, 5 )
+    item23 = wxButton( parent, ADVSEARCH_BUTTON, "Advanced...", wxDefaultPosition, wxDefaultSize, 0 )
+    item21.AddWindow( item23, 0, wxALIGN_CENTER|wxALL, 5 )
 
-    item22 = wxButton( parent, ID_BUTTON_CLEAR, "Clear", wxDefaultPosition, wxDefaultSize, 0 )
-    item22.SetToolTip( wxToolTip("Clear the search fields") )
-    item19.AddWindow( item22, 0, wxALIGN_CENTER|wxALL, 5 )
+    item24 = wxButton( parent, CLEAR_BUTTON, "Clear", wxDefaultPosition, wxDefaultSize, 0 )
+    item24.SetToolTip( wxToolTip("Clear the search fields") )
+    item21.AddWindow( item24, 0, wxALIGN_CENTER|wxALL, 5 )
 
-    item1.AddSizer( item19, 0, wxGROW|wxALIGN_BOTTOM|wxTOP|wxBOTTOM, 5 )
+    item1.AddSizer( item21, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 35 )
 
     item0.AddSizer( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item23 = wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(10,20), wxLI_VERTICAL )
-    item0.AddWindow( item23, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 )
+    item25 = wxFlexGridSizer( 0, 1, 0, 0 )
+    
+    item27 = wxStaticBox( parent, -1, "Parts" )
+    item26 = wxStaticBoxSizer( item27, wxVERTICAL )
+    
+    item28 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item28.AddGrowableCol( 1 )
+    
+    item29 = wxStaticText( parent, PARTNAME_LABEL, "Name", wxDefaultPosition, wxDefaultSize, 0 )
+    item28.AddWindow( item29, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+
+    item30 = wxTextCtrl( parent, SEARCH_PARTNAME, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item30.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
+    item30.Enable(False)
+    item28.AddWindow( item30, 0, wxALIGN_CENTER_VERTICAL, 5 )
+
+    item31 = wxStaticText( parent, PARTDESC_LABEL, "Description", wxDefaultPosition, wxDefaultSize, 0 )
+    item28.AddWindow( item31, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+
+    item32 = wxTextCtrl( parent, SEARCH_PARTDESC, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item28.AddWindow( item32, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item24 = wxFlexGridSizer( 0, 1, 2, 0 )
+    item26.AddSizer( item28, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
+
+    item25.AddSizer( item26, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+
+    item34 = wxStaticBox( parent, -1, "Models" )
+    item33 = wxStaticBoxSizer( item34, wxVERTICAL )
     
-    item26 = wxStaticBox( parent, -1, "Parts/Models" )
-    item25 = wxStaticBoxSizer( item26, wxVERTICAL )
+    item35 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item35.AddGrowableCol( 1 )
     
-    item27 = wxStaticText( parent, NAMECODE_LABEL, "Name", wxDefaultPosition, wxDefaultSize, 0 )
-    item27.Enable(False)
-    item25.AddWindow( item27, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item36 = wxStaticText( parent, MODELNAME_LABEL, "Name", wxDefaultPosition, wxDefaultSize, 0 )
+    item35.AddWindow( item36, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item28 = wxTextCtrl( parent, ID_TEXTCTRL_SEARCH_NAME_CODE, "", wxDefaultPosition, wxSize(200,-1), 0 )
-    item28.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
-    item28.Enable(False)
-    item25.AddWindow( item28, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 )
+    item37 = wxTextCtrl( parent, SEARCH_MODELNAME, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item37.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
+    item37.Enable(False)
+    item35.AddWindow( item37, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item29 = wxStaticText( parent, PARTNAME_LABEL, "Description", wxDefaultPosition, wxDefaultSize, 0 )
-    item25.AddWindow( item29, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item38 = wxStaticText( parent, MODELDESC_LABEL, "Description", wxDefaultPosition, wxDefaultSize, 0 )
+    item35.AddWindow( item38, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item30 = wxTextCtrl( parent, ID_TEXTCTRL_SEARCH_PART_NAME, "", wxDefaultPosition, wxSize(200,-1), 0 )
-    item25.AddWindow( item30, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 )
+    item39 = wxTextCtrl( parent, SEARCH_MODELDESC, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item35.AddWindow( item39, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item24.AddSizer( item25, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+    item33.AddSizer( item35, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
 
-    item32 = wxStaticBox( parent, -1, "Parts Lists" )
-    item31 = wxStaticBoxSizer( item32, wxVERTICAL )
+    item25.AddSizer( item33, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+
+    item41 = wxStaticBox( parent, -1, "Parts Lists" )
+    item40 = wxStaticBoxSizer( item41, wxVERTICAL )
+    
+    item42 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item42.AddGrowableCol( 1 )
     
-    item33 = wxStaticText( parent, CATEGORY_LABEL, "Category", wxDefaultPosition, wxDefaultSize, 0 )
-    item33.Enable(False)
-    item31.AddWindow( item33, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item43 = wxStaticText( parent, CATEGORY_LABEL, "Category", wxDefaultPosition, wxDefaultSize, 0 )
+    item42.AddWindow( item43, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item34 = wxTextCtrl( parent, ID_TEXTCTRL_SEARCH_CATEGORY, "", wxDefaultPosition, wxSize(150,-1), 0 )
-    item34.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
-    item34.Enable(False)
-    item31.AddWindow( item34, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
+    item44 = wxTextCtrl( parent, SEARCH_CATEGORY, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item44.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
+    item44.Enable(False)
+    item42.AddWindow( item44, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item35 = wxStaticText( parent, PLTYPE_LABEL, "Type", wxDefaultPosition, wxDefaultSize, 0 )
-    item35.Enable(False)
-    item31.AddWindow( item35, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item45 = wxStaticText( parent, PLTYPE_LABEL, "Type", wxDefaultPosition, wxDefaultSize, 0 )
+    item42.AddWindow( item45, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item36 = wxComboBox( parent, ID_COMBO_SEARCH_PLTYPE, "", wxDefaultPosition, wxSize(140,-1), 
+    item46 = wxComboBox( parent, SEARCH_PLTYPE, "", wxDefaultPosition, wxDefaultSize, 
         ["Any","Antenna","Assembly","Board","Bus","Downlink","Harness","Instrument","LRU","Power","Software","Spacecraft","System","Unit"] , wxCB_DROPDOWN )
-    item36.SetToolTip( wxToolTip("Specify a component type as part of the search criteria") )
-    item36.Enable(False)
-    item31.AddWindow( item36, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
+    item46.SetToolTip( wxToolTip("Specify a component type as part of the search criteria") )
+    item46.Enable(False)
+    item42.AddWindow( item46, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item24.AddSizer( item31, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+    item40.AddSizer( item42, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
 
-    item38 = wxStaticBox( parent, -1, "Documents" )
-    item37 = wxStaticBoxSizer( item38, wxVERTICAL )
+    item25.AddSizer( item40, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+
+    item48 = wxStaticBox( parent, -1, "Documents" )
+    item47 = wxStaticBoxSizer( item48, wxVERTICAL )
+    
+    item49 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item49.AddGrowableCol( 1 )
     
-    item39 = wxStaticText( parent, TITLE_LABEL, "Title", wxDefaultPosition, wxDefaultSize, 0 )
-    item39.Enable(False)
-    item37.AddWindow( item39, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item50 = wxStaticText( parent, TITLE_LABEL, "Title", wxDefaultPosition, wxDefaultSize, 0 )
+    item49.AddWindow( item50, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item40 = wxTextCtrl( parent, ID_TEXTCTRL_SEARCH_DOCTITLE, "", wxDefaultPosition, wxSize(200,-1), 0 )
-    item40.SetToolTip( wxToolTip("Specify all or part of a drawing number as part of the search criteria") )
-    item40.Enable(False)
-    item37.AddWindow( item40, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
+    item51 = wxTextCtrl( parent, SEARCH_DOCTITLE, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item51.SetToolTip( wxToolTip("Specify all or part of a drawing number as part of the search criteria") )
+    item51.Enable(False)
+    item49.AddWindow( item51, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item41 = wxStaticText( parent, DOCTYPE_LABEL, "Type", wxDefaultPosition, wxDefaultSize, 0 )
-    item41.Enable(False)
-    item37.AddWindow( item41, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP, 5 )
+    item52 = wxStaticText( parent, DOCTYPE_LABEL, "Type", wxDefaultPosition, wxDefaultSize, 0 )
+    item49.AddWindow( item52, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item42 = wxComboBox( parent, ID_COMBO_SEARCH_DOCTYPE, "", wxDefaultPosition, wxSize(140,-1), 
+    item53 = wxComboBox( parent, SEARCH_DOCTYPE, "", wxDefaultPosition, wxDefaultSize, 
         ["Any","Antenna","Assembly","Board","Bus","Downlink","Harness","Instrument","LRU","Power","Software","Spacecraft","System","Unit"] , wxCB_DROPDOWN )
-    item42.SetToolTip( wxToolTip("Specify a component type as part of the search criteria") )
-    item42.Enable(False)
-    item37.AddWindow( item42, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 )
+    item53.SetToolTip( wxToolTip("Specify a component type as part of the search criteria") )
+    item53.Enable(False)
+    item49.AddWindow( item53, 0, wxALIGN_CENTER_VERTICAL, 5 )
+
+    item47.AddSizer( item49, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 )
 
-    item24.AddSizer( item37, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+    item25.AddSizer( item47, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
 
-    item0.AddSizer( item24, 0, wxALIGN_CENTER|wxALL, 5 )
+    item0.AddSizer( item25, 0, wxGROW, 5 )
 
     if set_sizer == True:
         parent.SetAutoLayout( True )

Index: PanGalactic/pangalactic/utils/localdb.py
diff -u PanGalactic/pangalactic/utils/localdb.py:1.74 PanGalactic/pangalactic/utils/localdb.py:1.75
--- PanGalactic/pangalactic/utils/localdb.py:1.74	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/utils/localdb.py	Wed Apr  7 12:11:50 2004
@@ -151,14 +151,36 @@
             else:
                 self.dbroot[dict] = ZODB.Persistence.PersistentMapping()  
                 
-    def SaveState(self, state):
-        print "localdb.savestate", state.pgef_oid
+
+    def saveDict(self, dictname, obj):
+        #print "localdb.savedict", dictname, obj.pgef_oid
         try:
-            del self.dbroot[self.STATE][state.pgef_oid]
+            for key, value in self.dbroot[dictname].items():
+                del self.dbroot[dictname][key]
         except:
             pass
-        self.dbroot[self.STATE][state.pgef_oid] = state
-        print self.dbroot[self.STATE]
+        self.dbroot[dictname][obj.pgef_oid] = obj
+
+    def SaveUser(self, user = None):
+#        print "localdb.saveuser"
+        if user:
+            self.saveDict(self.USER, user)
+                    
+    def SaveState(self, state):
+#        print "localdb.savestate", state.pgef_oid
+        self.saveDict(self.STATE, state)
+
+    def SaveRoles(self, RolesList = None):
+#        print "localdb.saveroles"
+        if RolesList:
+            try:
+                for key, value in self.dbroot[self.ROLE].items():
+                    del self.dbroot[self.ROLE][key]
+            except:
+                pass
+
+            for obj in RolesList:
+                self.saveItNoLookup(self.ROLE, obj, True)
 
 
     def savePasswds(self, login_pwd, new_pwd):
@@ -468,17 +490,6 @@
             return []
         
 
-    def SaveRoles(self, RolesList = None):
-        print "localdb.saveroles"
-        if RolesList:
-            #self.dbroot[self.ROLE] = RolesList
-            for obj in RolesList:
-                self.saveItNoLookup(self.ROLE, obj, True)
-                    
-#    def SaveUser(self, user = None):
-#        if user:
-#            self.dbroot[self.USER] = user
-                    
     def getLocalObject(self, searchdict, pgef_oid):
         #print "localdb.getlocalobject", searchdict, pgef_oid
         try:
@@ -530,7 +541,7 @@
         self.Commit()
     
     def getCommittedObjects(self):
-        print "localdb.getCommittedObjects"
+        #print "localdb.getCommittedObjects"
         objdict = {}
         for dictname in self.CommittedDicts:
             objs = self.getDict(dictname)
@@ -595,7 +606,7 @@
             return None
     
     def Save(self, unsavedlist, override = False):
-        print "localdb.save"
+        #print "localdb.save"
         retlist = []
         if unsavedlist:
             for obj in unsavedlist:
@@ -609,7 +620,7 @@
                     self.saveItWithLookup(self.PARTSLIST, obj, override)
 
                 elif isinstance(obj, document.Document):
-                    print "saving document"
+                    #print "saving document"
                     self.saveItWithLookup(self.DOCUMENT, obj, override)
                         
                 elif isinstance(obj, pgeffile.PgefFile):
@@ -652,7 +663,7 @@
                     self.saveItWithLookup(self.ORGANIZATION, obj, override)
 
                 elif classname == "Person":
-                    self.saveItNoLookup(self.USER, obj, override)
+                    self.saveUser(obj)
 
                 else:
                     print "have unknown obj to save", classname, obj
@@ -815,7 +826,7 @@
 
 
     def SaveWfProcess(self, wflist, recurse = False):
-        print "\n\nlocaldb.SaveWfProcess", wflist
+        #print "\n\nlocaldb.SaveWfProcess", wflist
         for wfobj in wflist:
             if wfobj.wfdata:
                 self.saveItWithLookup(self.WFPROCESS, wfobj, True)
@@ -824,7 +835,7 @@
 
             if recurse:
                 for akey, avalue in wfobj.activities.items():
-                    print "activity", akey, avalue.id, avalue.name, avalue.fields
+                    #print "activity", akey, avalue.id, avalue.name, avalue.fields
                     self.saveItWithLookup(self.WFACTIVITY, avalue, True)
                 for tkey, tvalue in wfobj.transitions_dict.items():
                     self.saveItWithLookup(self.WFTRANSITION, tvalue, True)

Index: PanGalactic/pangalactic/utils/xmlrpcinterface.py
diff -u PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.47 PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.48
--- PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.47	Mon Apr  5 15:41:21 2004
+++ PanGalactic/pangalactic/utils/xmlrpcinterface.py	Wed Apr  7 12:11:50 2004
@@ -3,10 +3,10 @@
 """
 PanGalactic Client XML-RPC Interfaces
 
-@version: $Revision: 1.47 $
+@version: $Revision: 1.48 $
 """
 
-__version__ = "$Revision: 1.47 $"[11:-2]
+__version__ = "$Revision: 1.48 $"[11:-2]
 
 import xmlrpclib
 import types
@@ -191,10 +191,11 @@
         @param objs: objects to be hooked up.  Don't worry if you
                      pass an irrelevent object.
         """
+        print "xmlrpc.getobjects"
         # get only the latest version for versioned objects, if requested
         if head_flag:
-            if classname in ["Part", "Document", "Model", "OntoClass"]:
-                fields["head_flag"] = 1
+            if classname in ["Part", "Document", "Model", "OntoClass", "PartsList"]:
+                fields["head_flag"] = head_flag
 
         if objs == None:
             objs = []
@@ -245,17 +246,23 @@
         @type class_attr_dict: dictionary
         @param class_attr_dict: looks like {classname:(attrname, attrvalue, comparator),}
         """
-        print "xmlrpcinterface.search", class_attr_dict
+        print "\nxmlrpcinterface.search", class_attr_dict
         if localobjs == None:
             localobjs = []
         retlist = []
         for classname, attrlist in class_attr_dict.items():
             objlist = []
             print " ", classname, attrlist
-            data = self._RPC.search(classname, 1, 0, attrlist)
+            # do not get back referenced objects for now (first 0/1)
+            # do get back subtypes (second 0/1)
+            data = self._RPC.search(classname, 0, 1, attrlist)
             if data:
-                print "have data"
+#                print "have data", len(data)
+#                for d in data:
+#                    print d["id"], d["short_description"], d["onto_class"]
                 objlist, localobjs = self._factory.rememberAll(data, localobjs)
+#                print "len objlist", len(objlist)
+#                print "len localobjs", len(localobjs)
                 for obj in objlist:
                     if obj.__class__.__name__ == classname:
                         retlist.append(obj)

From pbear at ned.gsfc.nasa.gov  Wed Apr  7 16:11:40 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Wed Apr  7 16:11:42 2004
Subject: [Pangalactic-commits] improved treatment of objects in db browser
	display
Message-ID: <200404072011.i37KBeNS002472@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/client/fnord.py 1.89 1.90
PanGalactic/pangalactic/client/modules/plm/plmtool.py 1.18 1.19
PanGalactic/pangalactic/client/modules/psm/psmtool.py 1.158 1.159
PanGalactic/pangalactic/enterprise/workflow/wfprocess.py 1.23 1.24
PanGalactic/pangalactic/utils/configuredisplay.py 1.7 1.8
PanGalactic/pangalactic/utils/datamanager.py 1.94 1.95
PanGalactic/pangalactic/utils/dbbrowser.py 1.15 1.16
PanGalactic/pangalactic/utils/localdb.py 1.75 1.76

Log message:
improved treatment of objects in db browser display


Index: PanGalactic/pangalactic/client/fnord.py
diff -u PanGalactic/pangalactic/client/fnord.py:1.89 PanGalactic/pangalactic/client/fnord.py:1.90
--- PanGalactic/pangalactic/client/fnord.py:1.89	Wed Apr  7 12:11:49 2004
+++ PanGalactic/pangalactic/client/fnord.py	Wed Apr  7 16:11:36 2004
@@ -1,13 +1,13 @@
 #!/usr/bin/env python 
 
-# $Id: fnord.py,v 1.89 2004/04/07 16:11:49 pbear Exp $
+# $Id: fnord.py,v 1.90 2004/04/07 20:11:36 pbear Exp $
 
 """
 Main application module for the PGEF desktop client.
 
-@version: $Revision: 1.89 $
+@version: $Revision: 1.90 $
 """
-__version__ = "$Revision: 1.89 $"[11:-2]
+__version__ = "$Revision: 1.90 $"[11:-2]
 
 from wxPython.wx import *
 from wxPython.grid import *
@@ -644,13 +644,15 @@
         dbb_frame.mainpanel = dbbrowser.zodbbrowser(dbb_frame, -1,
 #                                                    zodbroot = self.dm.getRoot(),
                                                     localdb = self.dm.localDB)
-        dbb_frame.mainpanel.FillChoice()
+        config_access = self.dm.getConfigAccess()
+        dbb_frame.mainpanel.FillChoice(config_access)
         dbb_frame.CentreOnParent()
         dbb_frame.Show(True)
         
     
     def OnGridToPdf(self, event = None):
         self.psmtool.OnGridToPdf()
+
         
     def OnGetMyStuff(self, event=None):
         if self.dm.user._loggedin:

Index: PanGalactic/pangalactic/utils/configuredisplay.py
diff -u PanGalactic/pangalactic/utils/configuredisplay.py:1.7 PanGalactic/pangalactic/utils/configuredisplay.py:1.8
--- PanGalactic/pangalactic/utils/configuredisplay.py:1.7	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/utils/configuredisplay.py	Wed Apr  7 16:11:38 2004
@@ -34,6 +34,7 @@
         EVT_BUTTON(self, ID_BTN_ADDALL, self.OnAddAll)
         EVT_LIST_ITEM_SELECTED(self, ID_LISTCTRL_SHOWN, self.OnShownItemClick)
 
+
     def GetBitmapbuttonDown(self):
         return wxPyTypeCast(self.FindWindowById(ID_BITMAPBUTTON_DOWN), "wxBitmapButton")
 

Index: PanGalactic/pangalactic/client/modules/plm/plmtool.py
diff -u PanGalactic/pangalactic/client/modules/plm/plmtool.py:1.18 PanGalactic/pangalactic/client/modules/plm/plmtool.py:1.19
--- PanGalactic/pangalactic/client/modules/plm/plmtool.py:1.18	Fri Mar  5 16:18:09 2004
+++ PanGalactic/pangalactic/client/modules/plm/plmtool.py	Wed Apr  7 16:11:36 2004
@@ -6,27 +6,28 @@
 # Summary:      Convert an MS input file into a tab-delimited ascii file
 # Copyright:    
 #----------------------------------------------------------------------------
+import os
+import shutil
+
 from wxPython.wx import wxPanel, wxMenu, wxMenuBar, wxFileDialog, wxMessageDialog
 from wxPython.wx import wxPyTypeCast, wxNewId, wxBeginBusyCursor, wxEndBusyCursor, wxSafeYield
 from wxPython.wx import wxDefaultSize, wxDefaultPosition, wxVERTICAL, false, true, wxYES_NO
 from wxPython.wx import EVT_BUTTON, EVT_COMBOBOX, EVT_LISTBOX, EVT_SPINCTRL, EVT_CHECKBOX, EVT_MENU
+
 try:
     from ms2file import *
     from pythonwin_excelwrapper import *
 except:
-    print "plmtool.excelimport.failed"
+    print "NOTE: Conversion for import of MS Excel Parts Lists is not available."
     
-from ms2file_new_wdr import *
-from epimsgrid import *
-from epimsevent import *
-#from modules.pgdatapanel import PGDataPanel
-
 import pangalactic.utils.toolframe as toolframe
-import epimsmapping
-import os
 import pangalactic.utils.preferences as preferences
 
-# constants
+from pangalactic.client.modules.plm.ms2file_new_wdr import *
+from pangalactic.client.modules.plm.epimsgrid import *
+from pangalactic.client.modules.plm.epimsevent import *
+import pangalactic.client.modules.plm.epimsmapping
+
 
 HELP_TEXT = "This tool supports the conversion of an MS Excel spreadsheet into a tab-delimited file that can be uploaded into EPIMS.\n\nThe tool reads in a copy of the data from Excel's ACTIVE worksheet.  It removes any <RETURN>s and <TAB>s inside cells, and removes any blank rows and blank columns.  It then outputs its version of the data to a <TAB>-delimited text file that by default has the same base name as the input file, with an additional specification for the selected worksheet, and with a <.tsv> extension.\n\nDuring the session, the tool maintains a log file in the same directory as the input file.  The log file has the same base name as the input file, with an extension of <.log>.\n\nNOTES:\n\nThe data must include a row of column headings.\n\nWhen the tool encounters 5 (or more) blank rows/columns in succession, it assumes that these are the outer boundaries of the data in the spreadsheet.\n\nUnprintable characters are translated into tilde's.  (This means any characters above ASCII 127.)\n\n\nNEW in this release:\n\n1. You can specify a specific worksheet to process.\n\n2. You can specify the minimum number of data-filled cells per row.\n\n3. You can preview the first 10 rows of the selected worksheet.\n\n4.  You can specify the row containing column headings by clicking on the row in the sample grid (ditto for the initial row of data).\n\n5. Column headings can span more than one row.\n\n"
 
@@ -75,7 +76,6 @@
 
 
 class PLMTool(wxPanel):
-
     """
     This tool supports the conversion of an MS Excel spreadsheet
     into a tab-delimited file that can be uploaded into EPIMS.
@@ -119,11 +119,9 @@
 
     def __init__(self, parent, closer, state, datamgr, ID, pos, size):
         """Setup the interface, event handlers, and member variables."""
-#        PGDataPanel.__init__(self, parent, datamgr, ID, pos, size)
         wxPanel.__init__(self, parent, ID, pos, size)
 
         self.parent = parent
-        #print parent.sb
         self.closer = closer
         self.dm = datamgr
 
@@ -131,13 +129,10 @@
         self.Converted = false
         self.MappedRequiredColumn = false
 
-        # insert main window here
         self.nb = None
-#        self.FilesPage = 0
         self.ColumnLabelPage = 0
         self.DataOptionsPage = 1
         self.ColumnMappingPage = 2
-#        self.currentpage = self.ColumnLabelPage
         self.ConvertNotebookFunc(self, true, true)
         
         # make this dynamic - tbd
@@ -146,10 +141,7 @@
                            "FRL", "NSPAR", "LDC", "SN", "Ref Des", "Changed", "NSN"]
         for ndx in range(len(self.EpimsNames)):
             self.GetEpimsColNameWgt().Append(self.EpimsNames[ndx])
-#        EVT_COMBOBOX(self, INPUT_FORMAT_CMBX, self.onSelectInputFormat)
-#        EVT_COMBOBOX(self, OUTPUT_FORMAT_CMBX, self.onSelectOutputFormat)
-#        EVT_BUTTON(self, SOURCEBROWSE_BUTTON, self.onSelectSource)
-#        EVT_BUTTON(self, DESTBROWSE_BUTTON, self.onSelectDest)
+
         EVT_BUTTON(self, CONVERT_BUTTON, self.onConvert)
         EVT_LISTBOX(self, SHEETS_LISTBOX, self.onSelectSheet)
         EVT_EPIMSGRID_CLICK(self, DATAGRID_HEADERS_FOREIGN, self.onHeaderGridClick)
@@ -171,31 +163,16 @@
         EVT_MENU(self.parent, PLM_FILE_CONVERT_ITEM, self.onConvert)
         EVT_MENU(self.parent, PLM_FILE_PREVIEW_ITEM, self.onPreviewSheet)
         EVT_BUTTON(self, EPIMS_XREF_BUTTON, self.onShowMapping)
-#        EVT_BUTTON(self, TOHEADERPAGE_BUTTON, self.onToHeaderPage)
         EVT_BUTTON(self, TODATACONFIGPAGE_BUTTON, self.onToDataConfigPage)
         EVT_BUTTON(self, PREPROCESS_BUTTON, self.onPreprocessAndToColumnConfigPage)
-#        EVT_NOTEBOOK_PAGE_CHANGED(self, self.nbid, self.PageChanged)
-#        EVT_NOTEBOOK_PAGE_CHANGING(self, self.nbid, self.PageChanging)
 
-        # initialize various interface widgets
         self.parent.sb.SetField("", 1)
-#        self.GetStatusWgt().SetValue('')
-#        self.GetHeaderStatusWgt().SetValue('')
-#        self.GetDataStatusWgt().SetValue('')
-#        self.GetFileStatusWgt().SetValue('')
 
         self.InputFormat = EXCEL_FMT
-#        self.GetInputFormat().SetSelection(1) 
         self.OutputFormat = TEXT_FMT
-#        self.GetOutputFormat().SetSelection(0)
         self.PLMMenuBarFunc()
-        #self.parent.SetMenuBar(menubar)
-        #oldfilemenu = self.parent.menuBar.Replace(0, self.filemenu, "&File")
-        #oldhelpmenu = self.parent.menuBar.Replace(1, self.helpmenu, "&Help")
-        #local variables oldfilemenu and old help menu were not used.. so commented out..
         self.parent.menuBar.Replace(0, self.filemenu, "&File")
         self.parent.menuBar.Replace(1, self.helpmenu, "&Help")
-
         oldfilemenu = None
         oldhelpmenu = None
                                    
@@ -207,15 +184,22 @@
         self.DestFilename = None
 
         # ColumnInfo is a dictionary with a dictionary entry for each column in the spreadsheet
-        # {colnum : {col:value, {epims_col:value}, {epims_ndx:value}, {required:value}, {ignore:value}, {split:(ncols, delim)}}}
+        # {colnum : {col       : value},
+        #           {epims_col : value},
+        #           {epims_ndx : value},
+        #           {required  : value},
+        #           {ignore    : value},
+        #           {split     : (ncols, delim)}}
+        #
         # e.g., {1 : {{col:"id"}, {epims_col:"ID"}, {epims_ndx: 0}, {required:"YES"}, {ignore:"NO"}, {split:(1, "")}},
+
         self.ColumnInfo = {}
         self.ColumnMap = {}
         self.ColumnCount = None
         self.EpimsMappingFrame = None
         self.ClosingMappingFrame = false
 
-        # instantiate the class that handles the conversion
+        # instantiate the class that actually handles the conversion
         try:
             self.ms2file = MS2File()
         except:
@@ -228,8 +212,6 @@
             self.ms2file.setHeaderRow(1)
 
 
-    #def ConvertNotebookFunc(parent, self, call_fit = true, set_sizer = true):
-    #switched the self and parent back to where they should be...
     def ConvertNotebookFunc(self, parent, call_fit = true, set_sizer = true):
         """Build the PLM Tool interface."""
 
@@ -238,10 +220,6 @@
         self.nb = wxNotebook(parent, self.nbid, wxDefaultPosition, wxDefaultSize)
         nbsizer = wxNotebookSizer(self.nb)
 
-#        p = wxPanel(self.nb, -1)
-#        ConvertFilesFunc(p, false)
-#        self.nb.AddPage(p, "Select Spreadsheet")
-
         p = wxPanel(self.nb, -1)
         self.HeaderGrid = EpimsGrid(p, DATAGRID_HEADERS_FOREIGN)
         self.HeaderGrid.CreateGrid (18, 100)
@@ -286,33 +264,24 @@
         return nbpanel
 
     def PLMMenuBarFunc(self):
-#        item0 = wxMenuBar()
-
         self.filemenu = wxMenu()
         self.filemenu.Append(PLM_FILE_PREVIEW_ITEM, "&Pre-process", "Pre-process the worksheet")
         self.filemenu.Append(PLM_FILE_CONVERT_ITEM, "Con&vert", "Convert the worksheet to delimited file")
         self.filemenu.Append(PLM_FILE_CLOSE_ITEM, "&Close", "Close this window")
-#        item0.Append(self.filemenu, "&File")
 
         self.helpmenu = wxMenu()
         self.helpmenu.Append(PLM_HELP_ITEM, "About...", "Show information about this program")
-#        item0.Append(self.helpmenu, "&Help")
-    
-#        return item0
+
 
     def SetImportFileName(self, path):
         try:
             self.InputPath = path.split('.')[0]
-#            self.GetSourceFilename().SetValue(path)
             self.OutputPath = os.path.join(self.State.workingdir, "tmp", os.path.basename(self.InputPath))
-#            self.GetDestFilename().SetValue(self.OutputPath + '_sheet1' +
-#                                            EXT_LOOKUP_OUTPUT[self.OutputFormat])
             self.DestFilename = self.OutputPath + '_sheet1' + EXT_LOOKUP_OUTPUT[self.OutputFormat]
             logfile = self.OutputPath + LOG_EXT
             if self.ms2file:
                 self.ms2file.setLogFile(logfile)
 
-            import shutil
             tmpdir = os.path.join(self.State.workingdir, "tmp")
             self.tmpfile = tmpdir + os.path.basename(path)
             shutil.copy(path, tmpdir)
@@ -324,70 +293,31 @@
         
     def GetNickName (self):
         """Return the short name for the PLM Tool."""
-
         return "PLM"
     
     def GetName (self):
         """Return the full name for the PLM Tool."""
-
         return "Parts List Module"
     
     def GetTitle (self):
         """Return the titlebar text for the tool."""
-
         return self.GetName() + " (" + self.GetNickName() + ")"
 
     def UpdateForLogin(self):
         if self.dm.user._loggedin:
             print "plm - updateforlogin tbd"
 
-#    def UpdateMenuBar(self):
-#        self.AddToolMenu()
-#        self.AddToolHelp()
-
-#    def AddToolMenu(self): 
-#        """This method inserts the plm menu on the parent menubar, 
-#        just to the left of the Help Menu."""
-#
-#        if self.ToolMenu == None:
-#            self.ToolMenu = wxMenu()
-#            self.ToolMenu.Append(PLM_FILE_CONVERT_ITEM, "Con&vert\tAlt-v", "")
-#            self.ToolMenu.AppendSeparator()
-#            self.ToolMenu.Append(PLM_FILE_CLOSE_ITEM, "&Close", "")
-#
-#        mb = self.parent.GetMenuBar()
-#        mb.Insert((mb.GetMenuCount()-1), self.ToolMenu, "PLM-Tool") # tool menu is inserted left of Help
-#        mb.Refresh()
-
-#    def AddToolHelp(self):
-#        """This method adds plm help on the parent Help Menu."""
-#
-#        mb = self.parent.GetMenuBar()
-#        menu_obj = mb.GetMenu (mb.GetMenuCount()-1)
-#        menu_obj.Append(PLM_HELP_ITEM, "About PLM Tool", "")
-#        menu_obj.Enable(PLM_HELP_ITEM, false)
-#        mb.Refresh()
-
-#    def AddCloseItem(self):
-#        """This method adds plm Close item on the parent File Menu."""
-#        mb = self.parent.GetMenuBar()
-#        menu_obj = mb.GetMenu (0)
-#        close_pos = self.parent.GetCloseToolIDPos()
-#        menu_obj.Insert(close_pos+1, wxMenuItem (menu_obj, PLM_FILE_CLOSE_ITEM, "Close PLM Tool", ""))
-#        mb.Refresh()
 
     def CloseTool(self, event):
         """Close the tool."""
-
         if self.IsShown():
             self.Show(false)
             self.CleanupGUI()
         self.CloseDown()
-#        self.Close()
+
             
     def CleanupGUI(self):
         """Remove all tool-related widgets from the parent GUI."""
-
         mb = self.parent.GetMenuBar()
         menu_obj = mb.GetMenu (mb.GetMenuCount()-1)
         menu_obj.Remove(PLM_HELP_ITEM)
@@ -396,8 +326,6 @@
 
     def CloseDown(self):
         """Clean up class variables."""
-        # print "plmtool.closedown"
-
         if self.ms2file:
             self.ms2file.closeLogFile()
             self.ms2file.killMS()
@@ -409,7 +337,6 @@
 
     def OnSize (self, event):
         """Handle a size event."""
-
         self.SetSize(self.parent.GetClientSize())
         self.Layout()
 
@@ -419,8 +346,6 @@
     def PageChanged(self, event):
         pass            
 
-#    def onToHeaderPage(self, event):
-#        self.nb.SetSelection(self.ColumnLabelPage)
 
     def onToDataConfigPage(self, event):
         self.nb.SetSelection(self.DataOptionsPage)
@@ -437,17 +362,16 @@
         
     def onSelectInputFormat(self, event):
         """Set the input format."""
-
-        # tbd - perhaps wait until preview/convert?
         if self.ms2file:
-            #self.ms2file.setInputFormat (self.GetInputFormat().GetSelection())
             self.ms2file.setInputFormat (self.InputFormat)
 
   
     def onSelectSource(self, event = None):
-        """Set the source filename; set the destination filename based on the source filename."""
-
-        # Reset interface settings for new inputfile
+        """
+        Set the source filename;
+        set the destination filename based on the source filename.
+        Set interface defaults for a new source file.
+        """
         if self.ms2file:
             self.ms2file.closeInputFile()
         self.sheetno = 0
@@ -457,21 +381,14 @@
         dlg.CentreOnParent()
 
         if dlg.ShowModal() == wxID_OK:
-#            wxSafeYield()
-#            self.GetFileStatusWgt().SetValue("Checking file...")
             wxBeginBusyCursor()
-#            wxSafeYield()
             path = dlg.GetPath()
             self.InputPath = path.split('.')[0]
-#            self.GetSourceFilename().SetValue(path)
             self.SourceFilename = path
             self.OutputPath = os.path.join(self.State.workingdir, "tmp", os.path.basename(self.InputPath))
-#            self.GetDestFilename().SetValue(self.OutputPath + '_sheet1' +
-#                                            EXT_LOOKUP_OUTPUT[self.OutputFormat])
             self.DestFilename = self.OutputPath + "_sheet1" + EXT_LOOKUP_OUTPUT[self.OutputFormat]
             logfile = self.OutputPath + LOG_EXT
 
-            import shutil
             tmpdir = os.path.join(self.State.workingdir, "tmp")
             self.tmpfile = os.path.join(tmpdir, os.path.basename(path))
             shutil.copy(path, tmpdir)
@@ -482,8 +399,6 @@
 
             self.setFileStatistics()
             wxEndBusyCursor()
-#            wxSafeYield()
-#            self.GetFileStatusWgt().SetValue("Source selected...")
         else:
             dlg.Destroy()
             return false
@@ -496,7 +411,6 @@
         """Set the output format."""
 
         if self.ms2file:
-            #self.ms2file.setOutputFormat (self.GetOutputFormat().GetSelection())
             self.ms2file.setOutputFormat (self.OutputFormat)
         
     def onSelectDest(self, event):
@@ -507,37 +421,10 @@
         dlg.CentreOnParent()
         if dlg.ShowModal() == wxID_OK:
             path = dlg.GetPath()
-            #local variable not used.. so commented out
-            #filename = dlg.GetFilename()
-            self.DestFilename = path #elf.GetDestFilename().SetValue(path)
+            self.DestFilename = path
         dlg.Destroy()
 
 
-    # WDR: methods for PLMTool
-
-    # conversion
-
-    # status wgts - need to add these only if running standalong - tbd
-##    def GetStatusWgt(self):
-##        """Return a reference to the main status widget."""
-##        #return wxPyTypeCast(self.FindWindowById(STATUS_TEXTCTRL), "wxTextCtrl")
-
-##    def GetHeaderStatusWgt(self):
-##        """Return a reference to the header panel status widget."""
-##        #return wxPyTypeCast(self.FindWindowById(HEADERSTATUS_TEXTCTRL), "wxTextCtrl")
-
-##    def GetDataStatusWgt(self):
-##        """Return a reference to the data panel status widget."""
-##        #return wxPyTypeCast(self.FindWindowById(DATASTATUS_TEXTCTRL), "wxTextCtrl")
-
-#    def GetFileStatusWgt(self):
-#        """Return a reference to the cell panel status widget."""
-#        return wxPyTypeCast(self.FindWindowById(FILESTATUS_TEXTCTRL), "wxTextCtrl")
-
-#    def GetSourceFilename(self): 
-#        """Return a reference to the source filename field."""
-#        return wxPyTypeCast(self.FindWindowById(SOURCE_TEXTCTRL), "wxTextCtrl")
-
     def GetHeaderStartRow(self):
         """Return a reference to the column header row field."""
         return wxPyTypeCast(self.FindWindowById(HEADERSTART_SPINCTRL), "wxSpinCtrl")
@@ -550,19 +437,6 @@
         """Return a reference to the data row field."""
         return wxPyTypeCast(self.FindWindowById(DATASTART_SPINCTRL), "wxSpinCtrl")
 
-#    def GetInputFormat(self):
-#        """Return a reference to the input format widget."""
-#        return wxPyTypeCast(self.FindWindowById(INPUT_FORMAT_CMBX), "wxComboBox")
-
-#    def GetDestFilename(self):
-#        """Return a reference to the destination filename field."""
-#        return wxPyTypeCast(self.FindWindowById(DEST_TEXTCTRL), "wxTextCtrl")
-
-#    def GetOutputFormat(self):
-#        """Return a reference to the output format widget."""
-#        return wxPyTypeCast(self.FindWindowById(OUTPUT_FORMAT_CMBX), "wxComboBox")
-
-    # configuration
 
     def GetMinColCheck(self): 
         """Return a reference to the widget that specifies whether or not a row of
@@ -620,7 +494,6 @@
         """Return a reference to the widget that contains the delimiter for a column split."""
         return wxPyTypeCast(self.FindWindowById(SPLITCOL_TEXTCTRL), "wxTextCtrl")
 
-    # statistics
 
     def GetSheetListWgt(self):
         """Return a reference to the widget that contsins list of worksheets in the input file."""
@@ -646,30 +519,22 @@
         return wxPyTypeCast(self.FindWindowById(EPIMS_XREF_BUTTON), "wxButton")
 
 
-    # WDR: handler implementations for ms2filemain
-
     def onSelectSheet(self, event):
         """Event handler for selecting the current worksheet."""
-
         self.sheetno = self.GetSheetListWgt().GetSelection() + 1
         self.setSheetStatistics(self.sheetno)
 
     def onPreviewSheet(self, event = None):
         """Event handler for previewing the first several rows of the selected worksheet."""
-
         wxBeginBusyCursor()
-#        wxSafeYield()
         self.nb.SetSelection(1)
-#        self.GetDataStatusWgt().SetValue("Starting Preview...")
         self.parent.sb.SetField("Starting preview...", 1)
-#        wxSafeYield()
         if self.ms2file:
             self.ms2file.writeLogFile ("headerrow: %i" % self.ms2file.getHeaderRow())
             self.ms2file.writeLogFile ("datarow: %i" % self.ms2file.getDataStartRow())
             self.ms2file.SetColumnMap(self.GetColumnMapping())
             self.PreviewSheet()
         wxEndBusyCursor()
-#        wxSafeYield()
         
     def onCellGridClick(self, event):
         """Event handler for a mouseclick in the preview grid (data row selection)."""
@@ -678,17 +543,12 @@
         
     def onHeaderGridClick(self, event):
         """Event handler for a mouseclick in the preview grid (header row selection)."""
-
         self.GetHeaderStartRow().SetValue (event.GetSelectedRow() + 1)
-        # print "start values"
-        # print self.GetHeaderStartRow().GetValue()
-        # print self.GetHeaderSpanWgt().GetValue()
         self.GetDataStartRow().SetValue(self.GetHeaderStartRow().GetValue() + self.GetHeaderSpanWgt().GetValue())
         self.CellGrid.SelectRow(self.GetDataStartRow().GetValue() - 1)
         
     def onCellGridDrag(self, event):
         """Event handler for a mousedrag in the preview grid (data row selection)."""
-
         self.RowSpan = event.GetSelectedRowSpan()
         self.GetHeaderSpanWgt().SetValue(self.RowSpan)
         self.GetHeaderStartRow().SetValue (event.GetSelectedRow()+1)
@@ -696,7 +556,6 @@
         
     def onHeaderStartRow(self, event):
         """Event handler for a change in the field containing the column header starting row."""
-
         if self.ms2file:
             self.ms2file.setHeaderRow (self.GetHeaderStartRow().GetValue())
         self.GetDataStartRow().SetValue(self.GetHeaderStartRow().GetValue() + self.GetHeaderSpanWgt().GetValue())
@@ -704,7 +563,6 @@
 
     def onHeaderRowSpan(self, event):
         """Event handler for a change in the field containing the column header row span."""
-
         self.GetDataStartRow().SetValue(self.GetHeaderStartRow().GetValue() + self.GetHeaderSpanWgt().GetValue())
         self.CellGrid.SelectRow(self.GetDataStartRow().GetValue() - 1)
         if self.ms2file:
@@ -712,7 +570,6 @@
 
     def onDataStartRow(self, event):
         """Event handler for a change in the field containing the data starting row."""
-
         self.CellGrid.SelectRow(self.GetDataStartRow().GetValue() - 1)
         if self.ms2file:
             self.ms2file.setDataStartRow(self.GetDataStartRow().GetValue())
@@ -720,31 +577,23 @@
     def onMinColCheck(self, event):
         """Event handler for a change in the widget that specifies whether or not to
         use minimum column functionality."""
-
-#        self.GetStatusWgt().SetValue("Required column is not yet implemented")
         self.parent.sb.SetField("Still to be implemented", 1)
         #ungrey the mincolcount spinctrl
 
     def onMinColCount(self, event):
         """Event handler for a change in the widget that specifies how many cells of data
         a row must have for conversion."""
-
-#        self.GetStatusWgt().SetValue("Minimum columns is set to 2")
-        self.parent.sb.SetField("Minimum columns set", 1)
+        self.parent.sb.SetField("Minimum columns set to 2", 1)
         #set the minimum number of columns
 
     def onStrikeThroughText(self, event):
         """Event handler for a change in the widget that specifies whether or not
         struck-through data is converted."""
-
-#        self.GetStatusWgt().SetValue("Struck-through text is included")
         self.parent.sb.SetField("Struck-through text is included", 1)
 
     def onHighLevelAsciiText(self, event):
         """Event handler for a change in the widget that specifies whether or not
         high-level ascii data is converted to a tilde or not."""
-
-#        self.GetStatusWgt().SetValue("High-level ASCII characters are translated to <tilde>s")
         self.parent.sb.SetField("High-level ASCII characters are translated to <tilde>s", 1)
 
     def onColHeaderList(self, event):
@@ -766,9 +615,6 @@
         colwgt = self.GetColHeaderWgt()
         try:
             columninfo = self.ColumnInfo[colwgt.GetSelection()]
-            # set "col" = sheet col
-            # set "epims_col" = combo string
-            # set "epims_ndx" = combo selection
             columninfo["col"] = colwgt.GetString(colwgt.GetSelection())
             columninfo["epims_col"] = event.GetString()
             columninfo["epims_ndx"] = event.GetSelection()
@@ -798,10 +644,8 @@
             else:
                 self.EpimsMappingFrame.sb.ClearServer()
 
-        # print "building mapping"
         for key, dict in self.ColumnInfo.items():
             columninfo = dict
-#            print "(%s, %s)" % (columninfo["epims_col"], columninfo["col"]) # self.GetColHeaderWgt().GetString(key))
             if columninfo["epims_ndx"] > -1:
                 self.EpimsMappingFrame.AddMapping(columninfo["epims_col"], columninfo["col"]) # self.GetColHeaderWgt().GetString(key))
 
@@ -812,7 +656,6 @@
 
 
     def OnCloseMappingWindow(self, event = None):
-        # print "onclosemapping"
         if self.ClosingMappingFrame:
             if event:
                 event.Skip()
@@ -825,8 +668,6 @@
         return self.ColumnInfo
 
     def SetColumnInfo(self, colinfo, maxcols):
-#        print "setcolinfo"
-#        print "maxcols: " + str(maxcols)
         try:
             if self.ColumnInfo == None:
                 self.ColumnInfo = {}
@@ -854,63 +695,41 @@
     def GetColumnMapping(self):
         # epims column index is key
         # spreadsheet column is value
-
-#        print "getcolumnmapping"
-#        print "num info: " + str(len(self.ColumnInfo))
-#        print "columninfo"
-#        print self.ColumnInfo
-
         map = {}
-#        print "\n"
         for key, dict in self.ColumnInfo.items():
             columninfo = dict
-#            print columninfo
             if (columninfo["epims_col"] == "Unmapped"):
                 map[columninfo["epims_ndx"]] = -1
             else:
                 ndx = int(columninfo["epims_ndx"]) - 1
                 map[ndx] = key
-
-#        print "map"
-#        print map
-#        print "end map"
         return map
     
     def onRequiredCol(self, event):
         """Event handler for a change in the widget that specifies whether or not a
         row must have data in the selected column for conversion."""
-
-#        self.GetStatusWgt().SetValue("Required columns are not yet implemented")
         self.parent.sb.SetField("Required columns are not yet implemented", 1)
         #set the required flag for selected header
 
     def onIgnoreCol(self, event):
         """Event handler for a change in the widget that specifies whether or not a column
         is ignored (not converted)."""
-
-#        self.GetStatusWgt().SetValue("Ignored columns are not yet implemented")
         self.parent.sb.SetField("Ignored columns are not yet implemented", 1)
 
     def onSplitCol(self, event):
         """Event handler for a change in the widget that specifies whether or not a column
         is ignored (not converted)."""
-
-#        self.GetStatusWgt().SetValue("Splitting columns is not yet implemented")
-        self.parent.sb.SetField("Splitting columns are not yet implemented", 1)
+        self.parent.sb.SetField("Splitting columns is not yet implemented", 1)
 
     def onSplitColCount(self, event):
         """Event handler for a change in the widget that specifies whether or not a column
         is to be split."""
-
-#        self.GetStatusWgt().SetValue("Splitting columns is not yet implemented")
-        self.parent.sb.SetField("Splitting columns are not yet implemented", 1)
+        self.parent.sb.SetField("Splitting columns is not yet implemented", 1)
 
     def onSplitColDelim(self, event):
         """Event handler for a change in the widget that specifies what the delimiter is
         that splits a column."""
-
-#        self.GetStatusWgt().SetValue("Splitting columns is not yet implemented")
-        self.parent.sb.SetField("Splitting columns are not yet implemented", 1)
+        self.parent.sb.SetField("Splitting columns is not yet implemented", 1)
         # set the delimiter for splitting a column
 
     def onHelp(self, event):
@@ -931,10 +750,9 @@
     def fillGrid (self, grid):
         """This method fills the grid with the first several rows of data.  The <grid>
         parameter specifies which grid to fill."""
-        #print "fillgrid"
         if self.ms2file:
             grid.ClearGrid()
-            for i in range (1, 11):  #first 10 rows
+            for i in range (1, 11):  #first 10 rows seems like a reasonable number
                 cell_list = self.ms2file.previewRowAsList(i, 99) # first 99 columns
                 self.ms2file.writeLogFile (repr("gridrow (%i): <%s>" % (i, cell_list[i])))
                 for j in range(0, (len(cell_list))):  #fill the cells of the grid
@@ -943,7 +761,6 @@
     def fillHeaders(self):
         """This method obtains the column headers from the data, based on
         the specified (header and data) rows."""
-
         if self.ms2file:
             self.GetHeaderStartRow().SetValue(self.ms2file.getHeaderRow())
             self.GetDataStartRow().SetValue(self.ms2file.getDataStartRow())
@@ -962,9 +779,6 @@
         headerspan = self.GetHeaderSpanWgt().GetValue()
 
         if datarow < (headerrow + headerspan):
-#            self.GetFileStatusWgt().SetValue('Please adjust the header and/or data row settings')
-#            self.GetHeaderStatusWgt().SetValue('Please adjust the header and/or data row settings')
-#            self.GetDataStatusWgt().SetValue('Please adjust the header and/or data row settings')
             self.parent.sb.SetField("Please adjust the header and/or data row settings", 1)
         else:
             self.ms2file.setHeaderRow(self.GetHeaderStartRow().GetValue())
@@ -981,21 +795,16 @@
             self.fillGrid(self.GetSampleColGridWgt())
             self.ms2file.writeLogFile ("sample col grid filled")
             self.fillHeaders()
-#            self.GetDataStatusWgt().SetValue("...Preview Complete")
             self.parent.sb.SetField("...Preview complete", 1)
 
     def SetupSheet(self):
         """This method preprocesses the selected worksheet, setting up
         for the convert process."""
-
         headerrow = self.GetHeaderStartRow().GetValue()
         datarow = self.GetDataStartRow().GetValue()
         headerspan = self.GetHeaderSpanWgt().GetValue()
 
         if datarow < (headerrow + headerspan):
-#            self.GetFileStatusWgt().SetValue('Please adjust the header and/or data row settings')
-#            self.GetHeaderStatusWgt().SetValue('Please adjust the header and/or data row settings')
-#            self.GetDataStatusWgt().SetValue('Please adjust the header and/or data row settings')
             self.parent.sb.SetField("Please adjust the header and/or data row settings", 1)
         else:
             if self.ms2file:
@@ -1010,15 +819,13 @@
     def setSheetStatistics(self, sheetno):
         """This method sets the default values for the interface
         for the (newly) selected worksheet."""
-
         self.GetColNameWgt().Clear()
         self.GetColHeaderWgt().Clear()
         self.GetHeaderStartRow().SetValue (1)
         self.GetHeaderSpanWgt().SetValue (1)
         self.GetDataStartRow().SetValue (2)
         self.DestFilename = self.OutputPath + '_sheet' + str(sheetno) + EXT_LOOKUP_OUTPUT[self.OutputFormat]
-#        self.GetDestFilename().SetValue (self.OutputPath + '_sheet' + str(sheetno) +
-#                                         
+
         if self.ms2file:
             self.ms2file.setInputSheet(sheetno)
             self.fillGrid(self.GetHeaderGridWgt())
@@ -1029,22 +836,18 @@
 
     def setFileStatistics(self):
         """This method displays information about the input file."""
-#        self.GetDataStatusWgt().SetValue("Setting Statistics...")
         self.parent.sb.SetField("Setting statistics...", 1)
         if self.ms2file:
-            #self.ms2file.setInputFormat(self.GetInputFormat().GetSelection())
             self.ms2file.setInputFormat(self.InputFormat)
             self.ms2file.setInputFile(self.tmpfile)
             self.GetSheetListWgt().Clear()
             self.GetSheetListWgt().InsertItems (self.ms2file.getSheets(), 0)
             self.GetSheetListWgt().SetSelection(0, TRUE)
             self.setSheetStatistics (1)
-#        self.GetDataStatusWgt().SetValue("...Statistics Completed")
         self.parent.sb.SetField("...Statistics complete", 1)
         
     def onConvert(self, event):
-        """This method convert the selected worksheet to a tab-delimited text file."""
-
+        """This method converts the selected worksheet to a tab-delimited text file."""
         if not self.ms2file:
             dlg = wxMessageDialog(self, "Insufficient data for conversion", "Insufficient data", wxOK)
             dlg.CentreOnParent()
@@ -1053,60 +856,44 @@
             return
 
         self.nb.SetSelection(3)
-        # print "ncolinfo: " + str(len(self.ColumnInfo))
         for col in range(len(self.ColumnInfo)):
-            # print "checking col: " + str(col)
             colinfo = self.ColumnInfo[col]
             currcol = colinfo['epims_col']
             currvalue = colinfo['epims_ndx']
-            # print colinfo
             if currcol in RequiredEpimsColumns and currvalue <> -1:
                 # print "found a required column"
                 self.MappedRequiredColumn = true
                 break
 
         if not self.MappedRequiredColumn:
-#            self.GetStatusWgt().SetValue("You must map at least one of the first three EPIMS columns")
             self.parent.sb.SetField("You must map at least one of the first three EPIMS columns", 1)
             return
             
-
-        # print "about to get column mapping"
         self.ms2file.SetColumnMap(self.GetColumnMapping())
-        # print self.ms2file.ColumnMap
-
         self.ms2file.SetMappedHeaders(self.EpimsNames)
         # tbd loop through all worksheets, creating output files for each?
 
         self.ms2file.setOutputFormat(self.OutputFormat) # tbd: remove when format is selectable
-        self.ms2file.setMinColCount (2)
-        infile = self.SourceFilename #self.GetSourceFilename().GetValue()
-        outfile = self.DestFilename #self.GetDestFilename().GetValue()
+        self.ms2file.setMinColCount(2)
+        infile = self.SourceFilename
+        outfile = self.DestFilename
         # logfile has already been set, based on infile, so we don't need to do it here.
 
         # Has the user specified both an input and an output file?
         if infile and outfile:
             self.ms2file.writeLogFile ("Initializing...")
-#            self.GetStatusWgt().SetValue("Initializing...")
             self.parent.sb.SetField("Initializing...", 1)
-#            wxSafeYield()
             self.SetupSheet()
             self.ms2file.setOutputFile(outfile)
             self.ms2file.writeLogFile ("Converting...")
-#            self.GetStatusWgt().SetValue("Converting...")
             self.parent.sb.SetField("Converting...", 1)
-#            wxSafeYield()
             self.ms2file.removeBlankRowsCols ()
-#            wxSafeYield()
             self.ms2file.writeLogFile ("Checking for blank rows/columns...")
-#            self.GetStatusWgt().SetValue("Checking for blank rows/columns...")
             self.parent.sb.SetField("Checking for blank rows/columns...", 1)
-#            wxSafeYield()
             
             self.ms2file.convert(self.parent.sb, -1) # pass -1 to process all the rows.
             
             self.ms2file.writeLogFile ("Converted")
-#            self.GetStatusWgt().SetValue("...Converted")
             self.parent.sb.SetField("Converted", 1)
             self.ms2file.closeOutputFile()
             self.ms2file.writeLogFile ("Done")
@@ -1121,44 +908,29 @@
                 self.nb.SetSelection(self.ColumnLabelPage)
                 dlg.Destroy()
             else:
-                #print "try to close plm frame"
                 dlg.Destroy()
-                #print "destroyed msg dialog"
                 self.Show(false)
-                #print "show false"
                 self.closer.OnCloseImportPartsListFrame()
 
         else:
             self.parent.sb.SetField("Select source and destination first", 1)
-#            self.GetStatusWgt().SetValue("Select source and destination first")
-#            self.GetFileStatusWgt().SetValue("Select source and destination first")
 
     def ExportPartsListMappingFile(self):
-        #if self.dm.user.User ID:
-            #userid = self.dm.user.User ID
         if self.dm.user.id:
             userid = self.dm.user.id
         else:
             userid = preferences.GetPreference('userid')
         mapfilename = os.path.join(self.State.workingdir, "data", userid) + ".map"
-
         mapfile = open (mapfilename, "w", 1)
-        #local variable not used.. so commented out until sure..
-        #columnmap = self.GetColumnMapping()
         for colndx, info in self.ColumnInfo.items():
             if info["epims_ndx"] <> -1:
-#                print "colndx: " + str(colndx)
-#                print "info: " + repr(info)
                 buf = str(colndx) + "~" + info["col"] + "->" + str(info["epims_ndx"]) + "~" + info["epims_col"]
-#                print "buf: " + buf
                 mapfile.write(buf + "\n")
         mapfile.flush()
         mapfile.close()
 
     def ImportPartsListMappingFile(self):
-        #if self.dm.user.User ID:
         if self.dm.user.id:
-            #userid = self.dm.user.User ID
             userid = self.dm.user.id
         else:
             userid = preferences.GetPreference('userid')
@@ -1185,9 +957,6 @@
         while buffer:
             buffer = buffer.strip()
             maprow = list(buffer.split("->"))
-#            print "local: <" + maprow[0] + ">"
-#            print "server: <" + maprow[1] + ">"
-
             localinfo = list(maprow[0].split("~"))
             serverinfo = list(maprow[1].split("~"))
 
@@ -1202,11 +971,6 @@
             
         mapfile.close()
 
-#        print "columnmap: " + str(columnmap)
-#        print "columnname: " + str(columnname)
-
-#        print "ColumnInfo"
-#        print self.ColumnInfo
         for key, dict in self.ColumnInfo.items():
             columninfo = dict
 
@@ -1220,50 +984,8 @@
                     columninfo['epims_col'] = servercol
                     columninfo['col'] = localcol
                     self.ColumnInfo[key] = columninfo
-                    # print "found match: " + str(key)
-
-#        print "columninfo"
-#        print self.ColumnInfo
 
         
     def GetPartsListFilename(self):
-        return self.DestFilename #GetDestFilename().GetValue()
-
-#----------------------------------------------------------------------------
+        return self.DestFilename
 
-# are we running standalone?
-
-if __name__ == "__main__":
-    
-    class MainFrame(wxFrame):
-        def OnInit(self):
-            wxFrame.__init__(parent, -1, title, pos, size)
-
-        def CloseActiveTool(self, event):
-            self.foo.CloseTool(event)
-
-        def SetFoo(self, foo):
-            self.foo = foo
-        
-    class MainPLM(wxApp):
-        """Enable PLM Tool to run as a standalone program."""
-
-        def OnInit(self):
-            defsize = wxSize (800, 600)
-            self.frame = MainFrame(NULL, -1, "PLM Tool", wxDefaultPosition, defsize)
-            self.frame.SetMenuBar(MyMenuBarFunc())
-            self.foo = PLMTool (self.frame, -1, wxDefaultPosition, defsize)
-            self.frame.SetFoo (self.foo)
-            EVT_MENU(self, FILE_EXIT_ITEM, self.OnClose)
-            self.frame.Show(true)
-            self.SetTopWindow(self.frame)
- 
-            return true 
-  
-        def OnClose(self, event):
-            self.frame.Close()
-            
-    app = MainPLM(0)
-    app.MainLoop()
-
-    

Index: PanGalactic/pangalactic/client/modules/psm/psmtool.py
diff -u PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.158 PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.159
--- PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.158	Wed Apr  7 12:11:50 2004
+++ PanGalactic/pangalactic/client/modules/psm/psmtool.py	Wed Apr  7 16:11:37 2004
@@ -9,7 +9,7 @@
 This module is the main application code for the pgef client interface
 """
 
-__version__ = "$Revision: 1.158 $"[11:-2]
+__version__ = "$Revision: 1.159 $"[11:-2]
 
 
 import os
@@ -59,7 +59,17 @@
 from pangalactic.client.modules.psm import documenttreeframe
 from pangalactic.client.modules.psm import partslisttreeframe
 
-# support.httpdownload, partslistview, os, and modules.plm.ms2file are imported in ExportProperties
+try:
+    # this imports are for ExportProperties
+    import pangalactic.client.modules.psm.partslistview as partslistview
+    from pangalactic.client.modules.plm.ms2file import Data2MS
+    CAN_EXPORT_PROPERTIES = True
+
+except ImportError:
+    print "NOTE: Export of properties to MS Excel is unavailable."
+    CAN_EXPORT_PROPERTIES = False
+    
+    
 
 ID_PARTSLIST_MENU = wxNewId()
 ID_PARTSLIST_LINKITEM = wxNewId()
@@ -325,6 +335,10 @@
 
     def ExportProperties(self):
         #print "psmtool.exportproperties"
+        if not CAN_EXPORT_PROPERTIES:
+            print "Export to MS Excel is not available."
+            return
+        
         currentgrid = self.GetCurrentGrid()
         nrows = currentgrid.GetNumberRows()   # sometimes the grid has one empty row
         if nrows == 0:
@@ -334,7 +348,7 @@
             dlg.Destroy()
             return
         
-        import partslistview
+        #import partslistview
         temp = partslistview.PartsListView(self, -1, self.State)
         temp.Show(False)
         temp.ExportAsExcel(event = None, grid = currentgrid, skipcols = None,
@@ -369,7 +383,7 @@
             
         if len(files) > 0:
             try:
-                from modules.plm.ms2file import Data2MS
+                #from modules.plm.ms2file import Data2MS
                 temp = Data2MS(xlsfilename = filename)
                 temp.ExportMultipleFiles(files, singleworkbook = True, showexcel = False)
 
@@ -388,6 +402,7 @@
                                    wxOK | wxICON_EXCLAMATION)
             edlg.ShowModal()
             edlg.Destroy()
+
     
     def OnRightDown(self, event):
         point = event.GetPosition()

Index: PanGalactic/pangalactic/enterprise/workflow/wfprocess.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.23 PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.24
--- PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.23	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfprocess.py	Wed Apr  7 16:11:37 2004
@@ -72,7 +72,7 @@
 
         self.activities = activities
         self.transitions_dict = transitiondict  # dictionary of transitions by transition id
-        self.transitions = transitions         # dictionary of transition id lists by activity id
+        self.transitions = transitions          # dictionary of transition id lists by activity id
         self.can_start_list = canstartlist
         self.default_start_id = defaultstart
         self.requester = None
@@ -91,11 +91,15 @@
 
         self.wfdata = None
         self.wfdata_name = ""
-        
-        for key, activity in self.activities.items():
-            if key in canstartlist:
-                activity.can_start = 1
-                self.activities[key] = activity
+
+        for key in canstartlist:
+            self.activities[key].can_start = 1
+
+#old way
+#        for key, activity in self.activities.items():
+#            if key in canstartlist:
+#                activity.can_start = 1
+#                self.activities[key] = activity
 
 
     def calcTransitions(self):

Index: PanGalactic/pangalactic/utils/datamanager.py
diff -u PanGalactic/pangalactic/utils/datamanager.py:1.94 PanGalactic/pangalactic/utils/datamanager.py:1.95
--- PanGalactic/pangalactic/utils/datamanager.py:1.94	Wed Apr  7 12:11:50 2004
+++ PanGalactic/pangalactic/utils/datamanager.py	Wed Apr  7 16:11:38 2004
@@ -1,6 +1,6 @@
 # $Source: /repo/step_testbed/PanGalactic/pangalactic/utils/datamanager.py,v $
 
-__version__ = "$Revision: 1.94 $"[11:-2]
+__version__ = "$Revision: 1.95 $"[11:-2]
 
 
 import time
@@ -131,6 +131,17 @@
         self.server.changePassword(new_pwd)
         self.login(self.user.id, new_pwd)
 
+
+    def getConfigAccess(self):
+        print "datamanager.getConfigAccess.GOD"
+        return localdb.god
+
+        if self.user.god_flag:
+            return localdb.god
+        elif self.user.id == "admin":
+            return localdb.admin
+        else:
+            return localdb.user
         
     def getServerList(self):
         return [self.serverName]

Index: PanGalactic/pangalactic/utils/dbbrowser.py
diff -u PanGalactic/pangalactic/utils/dbbrowser.py:1.15 PanGalactic/pangalactic/utils/dbbrowser.py:1.16
--- PanGalactic/pangalactic/utils/dbbrowser.py:1.15	Wed Apr  7 12:11:50 2004
+++ PanGalactic/pangalactic/utils/dbbrowser.py	Wed Apr  7 16:11:38 2004
@@ -23,7 +23,8 @@
 DEBUG = 1
 DISPLAY_CONFIG = "display_config"
 
-COMPLEX_CLASS_TYPES = ["Project", "Acu", "Part", "Model", "Document", "DocPtRel"]
+COMPLEX_CLASS_TYPES = ["Project", "Acu", "Part", "Model", "Document", "DocPtRel",
+                       "WfActivity", "WfProcess", "WfTransition", "WfEventAudit"]
 DOC_CLASS_TYPES     = ["PgefAdvisory", "NasaAdvisory",
                        "GidepAlert", "GidepProblemAdvisory", "NasaImpactStatement"]
 EXCLUDE_LIST = ["UncommittedObjects"]
@@ -59,13 +60,20 @@
     def GetGrid(self):
         return wxPyTypeCast(self.FindWindowById(ID_GRID), "wxGrid")
     
-    def FillChoice(self):
+    def FillChoice(self, config = None):
         choice = self.GetRootitems()
         choice.Clear()
         items = self.dbroot.keys()
         items.sort()
+
         if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
             items.remove(configdbbrowser.DISPLAY_CONFIG)
+
+        if config:
+            for dictname, clearflag, config_access in self.localDB.dictlist:
+                if config_access > config:
+                   items.remove(dictname)
+
         choice.InsertItems(items, 0)
 
         # for now, do not automatically select a dictionary
@@ -110,12 +118,10 @@
         
 
     def GetDisplayConfig(self):
-        print "dbbrowser.getdisplayconfig"
         if self.dbroot:
             if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
                 if self.dbroot[configdbbrowser.DISPLAY_CONFIG]:
                     self.current_config = self.dbroot[configdbbrowser.DISPLAY_CONFIG]
-        print "self.current_config", self.current_config
         if len(self.current_config) == 0:
             print "no config; setup default config.  tbd"
             
@@ -172,14 +178,27 @@
             for col in range(len(mapping)):
                 self.grid.SetColLabelValue(col, mapping[col][1])
                 
+
+    def compareMapping(self, left, right):
+        if left[1] > right[1]:
+            return 1
+        elif left[1] < right[1]:
+            return -1
+        else:
+            return 0
+        
         
     def FillGrid(self, event = None):
-        print "dbbrowser.fillgrid"
         if self.dbroot:
             selection = self.GetRootitems().GetStringSelection()
 
             if selection in EXCLUDE_LIST:
-                print selection, "is not implemented"
+                print selection, "is not yet implemented"
+                self.ClearGrid()
+                if self.grid.GetNumberCols() > 0:
+                    self.grid.DeleteCols(0, self.grid.GetNumberCols())
+                if self.grid.GetNumberRows() > 0:
+                    self.grid.DeleteRows(0, self.grid.GetNumberRows())
                 return
 
             # how many rows should there be?
@@ -194,13 +213,12 @@
             if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
                 self.current_config = self.dbroot[DISPLAY_CONFIG]
 
-            displayed_fields = []
+            #displayed_fields = []
             if self.current_config.has_key(selection) and (len(self.current_config[selection]) > 0):
                 # there is an entry in the configuration dictionary
                 mapping = self.current_config[selection]
                 self.setColLabels(selection)
-                displayed_fields = [disp_col[0] for disp_col in mapping]
-
+                #displayed_fields = [disp_col[0] for disp_col in mapping]
             else:
                 # there is no entry in the configuration dictionary; generate default
                 if self.grid.GetNumberCols() > 0:
@@ -214,19 +232,19 @@
                             maxcols = len(obj.__dict__)
                             self.grid.AppendCols(maxcols)
                             attr_keys = obj.__dict__.keys()
-                            attr_keys.sort()
                             mapping = []
                             col = 0
-                            
                             # make the column labels (attribute names) look pretty
                             for attr_key in attr_keys:
                                 col_label = attr_key.replace("_", " ").title().strip()
-                                self.grid.SetColLabelValue(col, col_label)
                                 mapping.append((attr_key, col_label))
                                 col += 1
                             self.current_config[selection] = mapping
+
                             if len(mapping) > 0:
-                                displayed_fields = [disp_col[0] for disp_col in mapping]
+                                mapping.sort(self.compareMapping)
+                                for col in range(len(mapping)):
+                                    self.grid.SetColLabelValue(col, mapping[col][1])
                             break
                         except:
                             print "Sorry.  Ungriddable object.  Try again."
@@ -252,19 +270,32 @@
                     self.grid.SetCellValue(curr_row, 1, str(obj))
 
                 elif hasattr(obj, "__dict__"):
-                    for col in range(len(displayed_fields)):
-                        attr = displayed_fields[col]
+                    #for col in range(len(displayed_fields)):
+                    for col in range(len(mapping)):
+                        #attr = displayed_fields[col]
+                        attr = mapping[col][0]
                         attrvalue = obj.__dict__[attr]
                         try:
+                            val = str(attrvalue)
                             classname = attrvalue.__class__.__name__
                             if classname in DOC_CLASS_TYPES:
-                                val = attrvalue.getPrettyDocType()
+                                val = attrvalue.id + "(" + attrvalue.getPrettyDocType() + ")"
                             elif classname in COMPLEX_CLASS_TYPES:
-                                val = classname
-                            else:
-                                val = str(attrvalue)
+                                val = attrvalue.id + " (" + classname + ")"
+
+                            elif (isinstance(attrvalue, types.DictType) or
+                                  isinstance(attrvalue, types.ListType)):
+                                if len(attrvalue) > 0:
+                                    if isinstance(attrvalue, types.ListType):
+                                        attrclass = attrvalue[0].__class__.__name__
+                                    else:
+                                        attrclass = attrvalue[attrvalue.keys()[0]].__class__.__name__
+                                    if (attrclass in DOC_CLASS_TYPES or
+                                        attrclass in COMPLEX_CLASS_TYPES):
+                                         val = str(len(attrvalue)) + " elements"
                         except:
-                            val = str(attrvalue)
+                            pass
+
                         self.grid.SetCellValue(curr_row, col, val)
                         col += 1
                 else:

Index: PanGalactic/pangalactic/utils/localdb.py
diff -u PanGalactic/pangalactic/utils/localdb.py:1.75 PanGalactic/pangalactic/utils/localdb.py:1.76
--- PanGalactic/pangalactic/utils/localdb.py:1.75	Wed Apr  7 12:11:50 2004
+++ PanGalactic/pangalactic/utils/localdb.py	Wed Apr  7 16:11:38 2004
@@ -106,6 +106,7 @@
                       WFPROCESSTEMPLATE,
                       WFTRANSITION]
 
+
     def __init__(self, deletefiles = None):
         if not os.path.exists("data"):
             os.makedirs("data")

From pbear at ned.gsfc.nasa.gov  Thu Apr  8 12:27:57 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Thu Apr  8 12:28:00 2004
Subject: [Pangalactic-commits] default configuration for db browser is
	generated once and remembered
Message-ID: <200404081627.i38GRvHZ012218@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/client/fnord.py 1.90 1.91
PanGalactic/pangalactic/utils/configdbbrowser.py 1.8 1.9
PanGalactic/pangalactic/utils/configuredisplay.py 1.8 1.9
PanGalactic/pangalactic/utils/dbbrowser.py 1.16 1.17

Log message:
default configuration for db browser is generated once and remembered


Index: PanGalactic/pangalactic/client/fnord.py
diff -u PanGalactic/pangalactic/client/fnord.py:1.90 PanGalactic/pangalactic/client/fnord.py:1.91
--- PanGalactic/pangalactic/client/fnord.py:1.90	Wed Apr  7 16:11:36 2004
+++ PanGalactic/pangalactic/client/fnord.py	Thu Apr  8 12:27:54 2004
@@ -1,13 +1,13 @@
 #!/usr/bin/env python 
 
-# $Id: fnord.py,v 1.90 2004/04/07 20:11:36 pbear Exp $
+# $Id: fnord.py,v 1.91 2004/04/08 16:27:54 pbear Exp $
 
 """
 Main application module for the PGEF desktop client.
 
-@version: $Revision: 1.90 $
+@version: $Revision: 1.91 $
 """
-__version__ = "$Revision: 1.90 $"[11:-2]
+__version__ = "$Revision: 1.91 $"[11:-2]
 
 from wxPython.wx import *
 from wxPython.grid import *
@@ -592,8 +592,9 @@
             server.strip()
             port.strip()
             if server == '' or port == '':
-                errdlg = wxMessageDialog(self, "A server and a port are required", "Unable to comply",
-                              wxOK|wxCENTRE|wxICON_EXCLAMATION)
+                errdlg = wxMessageDialog(self, "A server and a port are required",
+                                         "Unable to comply",
+                                         wxOK|wxCENTRE|wxICON_EXCLAMATION)
                 errdlg.CentreOnParent()
                 errdlg.ShowModal()
             else:

Index: PanGalactic/pangalactic/utils/configuredisplay.py
diff -u PanGalactic/pangalactic/utils/configuredisplay.py:1.8 PanGalactic/pangalactic/utils/configuredisplay.py:1.9
--- PanGalactic/pangalactic/utils/configuredisplay.py:1.8	Wed Apr  7 16:11:38 2004
+++ PanGalactic/pangalactic/utils/configuredisplay.py	Thu Apr  8 12:27:55 2004
@@ -22,7 +22,7 @@
         self.current_config = None
 
         CustomizeFunc(self, true)
-        self.grid = self.GetGridMap()
+        self.grid = self.GetGridWgt()
         wxColumnSorterMixin.__init__(self, 1)
         
         EVT_BUTTON(self, ID_BITMAPBUTTON_UP, self.OnMoveUp)
@@ -41,7 +41,7 @@
     def GetBitmapbuttonUp(self):
         return wxPyTypeCast(self.FindWindowById(ID_BITMAPBUTTON_UP), "wxBitmapButton")
 
-    def GetGridMap(self):
+    def GetGridWgt(self):
         return wxPyTypeCast(self.FindWindowById(ID_GRID_MAP), "wxGrid")
 
     def GetCancel(self):
@@ -59,15 +59,15 @@
     def GetBtnAddall(self):
         return wxPyTypeCast(self.FindWindowById(ID_BTN_ADDALL), "wxBitmapButton")
 
-    def GetListctrlShown(self):
+    def GetShownWgt(self):
         return wxPyTypeCast(self.FindWindowById(ID_LISTCTRL_SHOWN), "wxListCtrl")
 
-    def GetListctrlAvailable(self):
+    def GetAvailableWgt(self):
         return wxPyTypeCast(self.FindWindowById(ID_LISTCTRL_AVAILABLE), "wxListCtrl")
     
     #needed by the columnsortermixin
     def GetListCtrl(self):
-        return self.GetListctrlAvailable() 
+        return self.GetAvailableWgt() 
     
     def Setup(self):
         pass
@@ -85,7 +85,8 @@
         pass
 
     
-    def _getSelectedIndices(self, list_widget, state = wxLIST_STATE_SELECTED): 
+    def _getSelectedIndices(self, list_widget, state = wxLIST_STATE_SELECTED):
+        #print "getselectedindices"
         indices = [] 
         found = 1 
         lastFound = -1 
@@ -95,7 +96,8 @@
                 break 
             else: 
                 lastFound = index 
-                indices.append(index) 
+                indices.append(index)
+        #print "end:", indices
         return indices  
     
             
@@ -111,12 +113,12 @@
             temp_list = zip(range(len(self.attr_list)), self.attr_list)
             self.itemDataMap = {}
             #print "\ntemp_list", temp_list
-        
+            wgt = self.GetAvailableWgt()
             for ndx, attr_string in temp_list:
                 self.itemDataMap[ndx] = attr_string
-                self.GetListctrlAvailable().InsertStringItem(ndx, attr_string)
-                self.GetListctrlAvailable().SetItemData(ndx, ndx)
-            self.GetListctrlAvailable().SetColumnWidth(0, wxLIST_AUTOSIZE)
+                wgt.InsertStringItem(ndx, attr_string)
+                wgt.SetItemData(ndx, ndx)
+            wgt.SetColumnWidth(0, wxLIST_AUTOSIZE)
             self.SortListItems(0, true)
             #print "\ndatamap", self.itemDataMap
             #print "end fillavailable"
@@ -129,7 +131,7 @@
         else:
             selected_ndxs = self._getSelectedIndices(from_list)
             
-        if from_list == self.GetListctrlShown():
+        if from_list == self.GetShownWgt():
             remove_from_grid = 1
 
         for ndx in selected_ndxs:
@@ -156,8 +158,9 @@
                 self.grid.DeleteRows(ndx, 1)
                 
     def MoveInList(self, list_obj, direction):
+        #print "moveinlist"
         #get the selected text and text
-        current_ndx = self._getSelectedIndices(self.GetListctrlShown())
+        current_ndx = self._getSelectedIndices(self.GetShownWgt())
         if len(current_ndx) == 0:
             return
 
@@ -165,12 +168,10 @@
         # only use the first index selected.
         # ignore the others
         current_ndx = current_ndx[0]
-
+        
         # don't try to
         # a.) move up at the top
         # b.) move down at the bottom
-        current_ndx = current_ndx[0]
-        
         if current_ndx == 0 and direction == -1:
             return
         if current_ndx == list_obj.GetItemCount() - 1 and direction == 1:
@@ -235,10 +236,10 @@
         
 
     def OnMoveUp(self, event):
-        self.MoveInList(self.GetListctrlShown(), -1)
+        self.MoveInList(self.GetShownWgt(), -1)
 
     def OnMoveDown(self, event):
-        self.MoveInList(self.GetListctrlShown(), 1)
+        self.MoveInList(self.GetShownWgt(), 1)
 
 
     def OnOK(self, event):
@@ -248,11 +249,11 @@
         event.Skip()
         
     def OnRemoveAll(self, event):
-        if self.GetListctrlShown().GetItemCount() == 0:
+        if self.GetShownWgt().GetItemCount() == 0:
             return
         self.grid.BeginBatch()
-        self.GetListctrlShown().DeleteAllItems()
-        self.GetListctrlAvailable().DeleteAllItems()
+        self.GetShownWgt().DeleteAllItems()
+        self.GetAvailableWgt().DeleteAllItems()
 
         self.FillAvailable()
         rows = self.grid.GetNumberRows()
@@ -260,15 +261,15 @@
         self.grid.EndBatch()
 
     def OnRemove(self, event):
-        self.MoveSelections(self.GetListctrlShown(), self.GetListctrlAvailable())
+        self.MoveSelections(self.GetShownWgt(), self.GetAvailableWgt())
         self.SortListItems(0, true)
  
     def OnAdd(self, event):
-        self.MoveSelections(self.GetListctrlAvailable(), self.GetListctrlShown())
+        self.MoveSelections(self.GetAvailableWgt(), self.GetShownWgt())
             
     def OnAddAll(self, event):
         self.grid.BeginBatch()
-        self.MoveSelections(self.GetListctrlAvailable(), self.GetListctrlShown(), move_all = 1)
+        self.MoveSelections(self.GetAvailableWgt(), self.GetShownWgt(), move_all = 1)
         self.grid.EndBatch()
         self.Parent.ProcessEvent(wxSizeEvent(self.Parent.GetSize()))
 

Index: PanGalactic/pangalactic/utils/configdbbrowser.py
diff -u PanGalactic/pangalactic/utils/configdbbrowser.py:1.8 PanGalactic/pangalactic/utils/configdbbrowser.py:1.9
--- PanGalactic/pangalactic/utils/configdbbrowser.py:1.8	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/utils/configdbbrowser.py	Thu Apr  8 12:27:55 2004
@@ -18,11 +18,17 @@
                  size = wxPyDefaultSize,
                  style = wxTAB_TRAVERSAL,
                  dbroot = None,
-                 collection_name = None):
+                 collection_name = None,
+                 current_config = None):
         ConfigureDisplay.__init__(self, parent, id, pos, size, style)
         self.collection_name = collection_name
         self.dbroot = dbroot
-        self.current_config = {}
+#        self.current_config = {}
+        if current_config:
+            self.current_config = current_config
+        else:
+            self.current_config = {}
+        #print "configdbbrowser.init", self.current_config
         self.Setup()
         
         EVT_BUTTON(self, wxID_CANCEL, self.OnCancel)
@@ -30,13 +36,15 @@
     
     def Setup(self):
         #print "configdbb.setup"
-        self.GetListctrlAvailable().ClearAll()
-        self.GetListctrlAvailable().InsertColumn(0, "Attribute Names")
-        self.GetListctrlAvailable().SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER)
-        
-        self.GetListctrlShown().ClearAll()
-        self.GetListctrlShown().InsertColumn(0, "Displayed Attributes")
-        self.GetListctrlShown().SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER)
+        wgt = self.GetAvailableWgt()
+        wgt.ClearAll()
+        wgt.InsertColumn(0, "Attribute Names")
+        wgt.SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER)
+
+        wgt = self.GetShownWgt()
+        wgt.ClearAll()
+        wgt.InsertColumn(0, "Displayed Attributes")
+        wgt.SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER)
 
         rows = self.grid.GetNumberRows()
         if rows:
@@ -55,7 +63,7 @@
             
     def CreateAttributeList(self):
         """Creates the list of all available attribute names in the entire collection"""
-#        print "configdbb.createattributelist"
+        #print "configdbb.createattributelist", self.collection_name
         temp = {}
         collection = self.dbroot[self.collection_name]
         for obj_id, obj in collection.items():
@@ -73,7 +81,7 @@
             
     def ReloadSelections(self):
         """Reloads the shown listctrl with the previous selections and also updates the grid"""
-#        print "configdbb.reloadselections"
+        #print "configdbb.reloadselections"
         
         #Get the list of tuples that are attr name and display name
         if self.dbroot.has_key(DISPLAY_CONFIG):
@@ -82,20 +90,24 @@
                 #print "displaymapping", DISPLAY_CONFIG, self.collection_name
                 selections = self.dbroot[DISPLAY_CONFIG][self.collection_name]
     
-                #loop through th elist and set the item as selected in the available listctrl
+                #loop through the list and set the item as selected in the available listctrl
+                availwgt = self.GetAvailableWgt()
+                shownwgt = self.GetShownWgt()
                 for attrname, dispname in selections:
-                    #print "attrname, dispname: (%s, %s)" % (attrname, dispname)
-                    ndx = self.GetListctrlAvailable().FindItem(-1, attrname)
-                    self.GetListctrlAvailable().SetItemState (ndx, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
+                    ndx = availwgt.FindItem(-1, attrname)
+                    #print "attrname, dispname", attrname, dispname, ndx
+                    availwgt.SetItemState (ndx, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
     
                     #move all the selected entries to the shown listctrl
-                    self.MoveSelections(self.GetListctrlAvailable(), self.GetListctrlShown())
+                    self.MoveSelections(availwgt, shownwgt)
     
                 #once again loop the list and put the display name into the grid
+                #print "selections", selections
                 for attrname, dispname in selections:
                     #print "displaynames (%s, %s)" % (attrname, dispname)
-                    ndx = self.GetListctrlShown().FindItem(-1, attrname)
+                    ndx = shownwgt.FindItem(-1, attrname)
                     self.grid.SetCellValue(ndx, 1, dispname)
+#        print "end reloadselections"
         
             
     def SaveConfig(self):
@@ -110,7 +122,7 @@
 
             
     def ReadConfig(self):
-        print "configdbb.readconfig"
+        #print "configdbb.readconfig"
         try:
             self.current_config = self.dbroot[DISPLAY_CONFIG]
             #print "current_config"
@@ -123,10 +135,10 @@
         #print "configdbb.getdisplaylist"
         numrows = self.grid.GetNumberRows()
         temp = []
-        for x in range(numrows):
-            cell_zero = self.grid.GetCellValue(x, 0)
-            cell_one = self.grid.GetCellValue(x, 1)
-            temp.append((cell_zero, cell_one))
+        for row in range(numrows):
+            attr_name = self.grid.GetCellValue(row, 0)
+            col_label = self.grid.GetCellValue(row, 1)
+            temp.append((attr_name, col_label))
         return temp
         
     

Index: PanGalactic/pangalactic/utils/dbbrowser.py
diff -u PanGalactic/pangalactic/utils/dbbrowser.py:1.16 PanGalactic/pangalactic/utils/dbbrowser.py:1.17
--- PanGalactic/pangalactic/utils/dbbrowser.py:1.16	Wed Apr  7 16:11:38 2004
+++ PanGalactic/pangalactic/utils/dbbrowser.py	Thu Apr  8 12:27:55 2004
@@ -30,7 +30,8 @@
 EXCLUDE_LIST = ["UncommittedObjects"]
 
 class zodbbrowser(wxPanel):
-    def __init__(self, parent, id, pos = wxDefaultPosition, size = wxDefaultSize, localdb = None):
+    def __init__(self, parent, id,
+                 pos = wxDefaultPosition, size = wxDefaultSize, localdb = None):
         wxPanel.__init__(self, parent, id, pos, size, style = wxTHICK_FRAME)
         self.Parent = parent
         self.localDB = localdb
@@ -156,13 +157,20 @@
         
     def FileConfig(self, event = None):
         collection_name = self.GetRootitems().GetStringSelection()
-        tmpsize = wxSize(750, 500)
-        cfg_frame = toolframe.toolFrame(self, -1, 'Configure DB Browser', wxDefaultPosition, tmpsize)
-        cfg_frame.mainpanel = configdbbrowser.ConfigDbBrowser(cfg_frame, -1,
-                                                              dbroot = self.dbroot,
-                                                              collection_name = collection_name)
-        cfg_frame.CentreOnParent()
-        cfg_frame.Show(true)
+        if collection_name:
+            tmpsize = wxSize(750, 500)
+            cfg_frame = toolframe.toolFrame(self, -1, 'Configure DB Browser', wxDefaultPosition, tmpsize)
+            cfg_frame.mainpanel = configdbbrowser.ConfigDbBrowser(cfg_frame, -1,
+                                                                  dbroot = self.dbroot,
+                                                                  collection_name = collection_name,
+                                                                  current_config = self.current_config)
+            cfg_frame.CentreOnParent()
+            cfg_frame.Show(true)
+        else:
+            errdlg = wxMessageDialog(self, "Select an entry from the list.", "No Entry Selected",
+                                     wxOK|wxCENTRE|wxICON_EXCLAMATION)
+            errdlg.CentreOnParent()
+            errdlg.ShowModal()
 
         
     def setColLabels(self, selection):
@@ -220,7 +228,8 @@
                 self.setColLabels(selection)
                 #displayed_fields = [disp_col[0] for disp_col in mapping]
             else:
-                # there is no entry in the configuration dictionary; generate default
+                # there is no entry in the configuration dictionary;
+                # generate default configuration and put it in dbroot
                 if self.grid.GetNumberCols() > 0:
                     self.grid.DeleteCols(0, self.grid.GetNumberCols())
                 
@@ -239,9 +248,11 @@
                                 col_label = attr_key.replace("_", " ").title().strip()
                                 mapping.append((attr_key, col_label))
                                 col += 1
-                            self.current_config[selection] = mapping
 
                             if len(mapping) > 0:
+                                self.current_config[selection] = mapping
+                                self.dbroot[DISPLAY_CONFIG] = self.current_config
+
                                 mapping.sort(self.compareMapping)
                                 for col in range(len(mapping)):
                                     self.grid.SetColLabelValue(col, mapping[col][1])
@@ -304,95 +315,6 @@
                 curr_row += 1
                     
             self.grid.AutoSizeColumns(true)
-
-# old way
-##
-##                for obj_id, obj in collection_dict.items():
-##                    if obj_id in displayed_fields:
-##                        if isinstance(obj, types.StringType):
-##                            self.grid.SetCellValue(curr_row, 0, obj_id)
-##                            self.grid.SetCellValue(curr_row, 1, str(obj))
-##                            curr_row += 1
-##                        else:
-##                            for attr, value in obj.__dict__.items():
-##                                try:
-##                                    if value.__class__.__name__ in COMPLEX_CLASS_TYPES:
-##                                        val = value.getPrettyDocType()
-##                                    else:
-##                                        print attr, "value type", type(value)
-##                                        val = str(value)
-##                                except:
-##                                    val = str(value)
-##                                self.grid.SetCellValue(curr_row, displayed_fields.index(attr), val)
-##                        curr_row += 1
-##            else:
-##                print "no key"
-##                if self.grid.GetNumberCols() > 0:
-##                    self.grid.DeleteCols(0, self.grid.GetNumberCols())
-                
-##                col = 0
-##                maxcols = 0
-##                # how many columns should there be?
-##                for obj_id, obj in collection_dict.items():
-##                    if hasattr(obj, "__dict__"):
-##                        curr_cols = len(obj.__dict__)
-##                        if curr_cols > maxcols:
-##                            maxcols = curr_cols
-##                    elif isinstance(obj, types.StringType):
-##                        maxcols = 2
-##                    else:
-##                        print "dbbrowser.fillgrid: only objects", selection
-##                        return
-                    
-##                if self.grid.GetNumberCols() > 0:
-##                    self.grid.DeleteCols(0, self.grid.GetNumberCols())
-##                self.grid.AppendCols(maxcols)
-##                for col in range(maxcols):
-##                     self.grid.SetColLabelValue(col, str(col + 1))
-
-##                obj_keys = collection_dict.keys()
-##                obj_keys.sort()
-##                for obj_key in obj_keys:
-##                    obj = collection_dict[obj_key]
-##                    col = 0
-##                    if hasattr(obj, "__dict__"):
-##                        print "class object"
-##                        attr_keys = obj.__dict__.keys()
-##                        attr_keys.sort()
-##                        for attr_key in attr_keys:
-##                            value = obj.__dict__[attr_key]
-##                            try:
-##                                if value.__class__.__name__ in COMPLEX_CLASS_TYPES:
-##                                    val = value.getPrettyDocType()
-##                                else:
-##                                    val = str(value)
-##                            except:
-##                                print "oops", attr_key
-##                                val = str(value)
-
-##                            self.grid.SetCellValue(curr_row, col, val)
-
-##                            if curr_row == 0:
-##                                col_label = attr_key.replace("_", " ").title().strip()
-##                                self.grid.SetColLabelValue(col, col_label)
-##                            col += 1
-
-##                    elif isinstance(obj, types.StringType):
-##                        print "string"
-##                        self.grid.SetCellValue(curr_row, 0, str(obj_key))
-##                        self.grid.SetCellValue(curr_row, 1, str(obj))
-
-##                        if curr_row == 0:
-##                            self.grid.SetColLabelValue(0, "Id")
-##                            self.grid.SetColLabelValue(1, "Value")
-##                        col += 1
-##                    else:
-##                        print "wtf"
-
-##                    curr_row += 1
-                    
-##            self.grid.AutoSizeColumns(true)
-
 
 
 

From waterbug at ned.gsfc.nasa.gov  Tue Apr 13 14:03:38 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Tue Apr 13 14:03:41 2004
Subject: [Pangalactic-commits] Directory
	/repo/step_testbed/PanGalactic/sandbox/gui added to the repository
Message-ID: <200404131803.i3DI3cQE000653@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/sandbox/gui

Log message:
Directory /repo/step_testbed/PanGalactic/sandbox/gui added to the repository


From waterbug at ned.gsfc.nasa.gov  Tue Apr 13 14:04:03 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Tue Apr 13 14:04:05 2004
Subject: [Pangalactic-commits] Directory
	/repo/step_testbed/PanGalactic/sandbox/gui/tpcpbecho added to
	the repository
Message-ID: <200404131804.i3DI43kt000701@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/sandbox/gui/tpcpbecho

Log message:
Directory /repo/step_testbed/PanGalactic/sandbox/gui/tpcpbecho added to the repository


From waterbug at ned.gsfc.nasa.gov  Tue Apr 13 14:06:01 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Tue Apr 13 14:06:02 2004
Subject: [Pangalactic-commits] Add Twisted PythonCard PB Echo client to
	sandbox.
Message-ID: <200404131806.i3DI61CO000832@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/sandbox/gui/tpcpbecho/pbecho.py None 1.1
PanGalactic/sandbox/gui/tpcpbecho/tpc.py None 1.1
PanGalactic/sandbox/gui/tpcpbecho/tpcpbechoclient.py None 1.1
PanGalactic/sandbox/gui/tpcpbecho/tpcpbechoclient.rsrc.py None 1.1

Log message:
Add Twisted PythonCard PB Echo client to sandbox.


From pbear at ned.gsfc.nasa.gov  Wed Apr 14 16:48:31 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Wed Apr 14 16:48:33 2004
Subject: [Pangalactic-commits] massive improvements to grid customization
Message-ID: <200404142048.i3EKmVAj016778@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/client/fnord.py 1.91 1.92
PanGalactic/pangalactic/client/modules/psm/checkedoutgrid.py 1.16 1.17
PanGalactic/pangalactic/client/modules/psm/doctreeframe.py 1.23 1.24
PanGalactic/pangalactic/client/modules/psm/pgefgrid.py 1.65 1.66
PanGalactic/pangalactic/client/modules/psm/psmtool.py 1.159 1.160
PanGalactic/pangalactic/client/modules/psm/searchframe.py 1.34 1.35
PanGalactic/pangalactic/client/tests/test_partslist.py 1.11 1.12
PanGalactic/pangalactic/client/tests/test_pgefobject.py 1.9 1.10
PanGalactic/pangalactic/client/tests/test_product.py 1.8 1.9
PanGalactic/pangalactic/enterprise/acu.py 1.6 1.7
PanGalactic/pangalactic/enterprise/dcu.py 1.8 1.9
PanGalactic/pangalactic/enterprise/docptrel.py 1.5 1.6
PanGalactic/pangalactic/enterprise/document.py 1.46 1.47
PanGalactic/pangalactic/enterprise/model.py 1.5 1.6
PanGalactic/pangalactic/enterprise/ontoclass.py 1.1 1.2
PanGalactic/pangalactic/enterprise/ontoproperty.py 1.1 1.2
PanGalactic/pangalactic/enterprise/organization.py 1.14 1.15
PanGalactic/pangalactic/enterprise/part.py 1.4 1.5
PanGalactic/pangalactic/enterprise/partslist.py 1.17 1.18
PanGalactic/pangalactic/enterprise/person.py 1.15 1.16
PanGalactic/pangalactic/enterprise/pgeffile.py 1.18 1.19
PanGalactic/pangalactic/enterprise/pgefobject.py 1.49 1.50
PanGalactic/pangalactic/enterprise/project.py 1.18 1.19
PanGalactic/pangalactic/enterprise/property.py 1.7 1.8
PanGalactic/pangalactic/enterprise/role.py 1.7 1.8
PanGalactic/pangalactic/enterprise/versionedobject.py 1.4 1.5
PanGalactic/pangalactic/enterprise/workflow/wfactivity.py 1.19 1.20
PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py 1.9 1.10
PanGalactic/pangalactic/enterprise/workflow/wffactory.py 1.17 1.18
PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py 1.16 1.17
PanGalactic/pangalactic/enterprise/workflow/wfprocess.py 1.24 1.25
PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py 1.30 1.31
PanGalactic/pangalactic/enterprise/workflow/wftransition.py 1.10 1.11
PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py 1.14 1.15
PanGalactic/pangalactic/utils/__init__.py 1.8 1.9
PanGalactic/pangalactic/utils/basegrid.py 1.19 1.20
PanGalactic/pangalactic/utils/configuredisplay.py 1.9 1.10
PanGalactic/pangalactic/utils/configuregrid.py 1.3 1.4
PanGalactic/pangalactic/utils/dbbrowser.py 1.17 1.18
PanGalactic/pangalactic/utils/dbbrowser.wdr 1.3 1.4
PanGalactic/pangalactic/utils/dbbrowser_wdr.py 1.3 1.4
PanGalactic/pangalactic/utils/localdb.py 1.76 1.77
PanGalactic/pangalactic/utils/pgefdatatable.py 1.7 1.8
PanGalactic/pangalactic/utils/utils.py 1.5 1.6

Log message:
massive improvements to grid customization


Index: PanGalactic/pangalactic/enterprise/ontoclass.py
diff -u PanGalactic/pangalactic/enterprise/ontoclass.py:1.1 PanGalactic/pangalactic/enterprise/ontoclass.py:1.2
--- PanGalactic/pangalactic/enterprise/ontoclass.py:1.1	Wed Mar 10 13:34:10 2004
+++ PanGalactic/pangalactic/enterprise/ontoclass.py	Wed Apr 14 16:48:26 2004
@@ -1,10 +1,10 @@
-# $Id: ontoclass.py,v 1.1 2004/03/10 18:34:10 waterbug Exp $
+# $Id: ontoclass.py,v 1.2 2004/04/14 20:48:26 pbear Exp $
 
 """
 A synonym for the ontology "Class" concept.
 """
 
-__version__ = "$Revision: 1.1 $"[11:-2]
+__version__ = "$Revision: 1.2 $"[11:-2]
 
 from pangalactic.enterprise.project import Project
 from pangalactic.enterprise.versionedobject import VersionedObject
@@ -13,9 +13,9 @@
     """
     A synonym for the ontology "Class" concept.
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     # These are fields that are excluded from copying or
     # comparisions between ProductMaster Objects
     _excluded_fields = ['create_datetime', 'pger_create_datetime', 'pgef_oid']
@@ -25,9 +25,9 @@
     _fk = {
            '_project' : 'project_oid'
           }
-    _gridmap = [ 
-                 ['Name', 'self.id', 'string']
-               ]
+#    _gridmap = [ 
+#                 ['Name', 'self.id', 'string']
+#               ]
     _schema_ext = {}
     _schema = _schema_ext.copy()
     _schema.update(VersionedObject._schema)

Index: PanGalactic/pangalactic/client/modules/psm/doctreeframe.py
diff -u PanGalactic/pangalactic/client/modules/psm/doctreeframe.py:1.23 PanGalactic/pangalactic/client/modules/psm/doctreeframe.py:1.24
--- PanGalactic/pangalactic/client/modules/psm/doctreeframe.py:1.23	Tue Mar 23 14:32:19 2004
+++ PanGalactic/pangalactic/client/modules/psm/doctreeframe.py	Wed Apr 14 16:48:25 2004
@@ -15,7 +15,7 @@
 import pangalactic.client.modules.psm.pgefdoctree as pgefdoctree
 import pangalactic.client.modules.psm.treeframe as treeframe 
 
-__version__ = "$Revision: 1.23 $"[11:-2]
+__version__ = "$Revision: 1.24 $"[11:-2]
 
 
 NEW_MODE = 1
@@ -44,8 +44,9 @@
         self.tree = pgefdoctree.PgefDocTree(self.vsplitter, self.tID, self.dm)
         self.tree.NewDocumentTree(self.dm)
 
-        self.grid = basegrid.BaseGrid(self.nb, -1, savename = 'doctreeframe_grid',
-                                      dbroot = self.dm.getRoot())
+        self.grid = basegrid.BaseGrid(self.nb, -1,
+                                      "Document",
+                                      localdb = self.dm.localDB)
         self.grid.SetSelectionMode(wxGrid.wxGridSelectCells)
         grid_tooltip = "A tabular display of the meta data of " + \
                        "the locally available documents."

Index: PanGalactic/pangalactic/enterprise/docptrel.py
diff -u PanGalactic/pangalactic/enterprise/docptrel.py:1.5 PanGalactic/pangalactic/enterprise/docptrel.py:1.6
--- PanGalactic/pangalactic/enterprise/docptrel.py:1.5	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/docptrel.py	Wed Apr 14 16:48:26 2004
@@ -1,12 +1,12 @@
-# $Id: docptrel.py,v 1.5 2004/03/10 14:12:28 waterbug Exp $
+# $Id: docptrel.py,v 1.6 2004/04/14 20:48:26 pbear Exp $
 
 """
 A relationship between a Document and a Part.
 
-@version: $Revision: 1.5 $
+@version: $Revision: 1.6 $
 """
 
-__version__ = "$Revision: 1.5 $"[11:-2]
+__version__ = "$Revision: 1.6 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -27,7 +27,7 @@
            '_doc' : 'doc_oid',
            '_part' : 'part_oid'
           }
-    _gridmap = []
+#    _gridmap = []
     _properties = PgefObject._properties.copy()
     _required = ['id']
     _refs = {

Index: PanGalactic/pangalactic/enterprise/project.py
diff -u PanGalactic/pangalactic/enterprise/project.py:1.18 PanGalactic/pangalactic/enterprise/project.py:1.19
--- PanGalactic/pangalactic/enterprise/project.py:1.18	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/project.py	Wed Apr 14 16:48:26 2004
@@ -1,12 +1,12 @@
-# $Id: project.py,v 1.18 2004/03/10 14:12:28 waterbug Exp $
+# $Id: project.py,v 1.19 2004/04/14 20:48:26 pbear Exp $
 
 """
 A specific, identifiable activity of Organizations and Persons.
 
-@version: $Revision: 1.18 $
+@version: $Revision: 1.19 $
 """
 
-__version__ = "$Revision: 1.18 $"[11:-2]
+__version__ = "$Revision: 1.19 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -23,9 +23,9 @@
     """
     A specific, identifiable activity of Organizations and Persons.
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     # These are fields that are excluded from copying or
     # comparisions between Project objects
     _excluded_fields = ['create_datetime',
@@ -36,14 +36,14 @@
     # These are the fields that will appear in when a Project is
     # placed in a grid.  The format for each field is 
     # [ Label, attribute, field_type ].
-    _gridmap = [
-                ['Project\nAcronym','self.id', 'string'],
-                ['Project\nName','self.name', 'string'],
-                ['POC','self.owner', 'string'],
-                ['Description','self.short_description', 'string'],
-                ['Created','self.create_datetime', 'string'],
-                ['Creator','self.creator_oid', 'string']
-               ]
+#    _gridmap = [
+#                ['Project\nAcronym','self.id', 'string'],
+#                ['Project\nName','self.name', 'string'],
+#                ['POC','self.owner', 'string'],
+#                ['Description','self.short_description', 'string'],
+#                ['Created','self.create_datetime', 'string'],
+#                ['Creator','self.creator_oid', 'string']
+#               ]
     _pk = ['id', 'id_context']
     _schema_ext = {}
     _schema = _schema_ext.copy()

Index: PanGalactic/pangalactic/enterprise/document.py
diff -u PanGalactic/pangalactic/enterprise/document.py:1.46 PanGalactic/pangalactic/enterprise/document.py:1.47
--- PanGalactic/pangalactic/enterprise/document.py:1.46	Wed Mar 10 17:16:32 2004
+++ PanGalactic/pangalactic/enterprise/document.py	Wed Apr 14 16:48:26 2004
@@ -1,10 +1,10 @@
-# $Id: document.py,v 1.46 2004/03/10 22:16:32 pbear Exp $
+# $Id: document.py,v 1.47 2004/04/14 20:48:26 pbear Exp $
 
 """
 The Mother of all PGEF Document types.  :)
 """
 
-__version__ = "$Revision: 1.46 $"[11:-2]
+__version__ = "$Revision: 1.47 $"[11:-2]
 
 import string
 from pangalactic.enterprise.versionedobject import VersionedObject
@@ -36,20 +36,20 @@
     _contains_methods = VersionedObject._contains_methods.copy()
     _contains_methods_ext = {'_files' : 'addFile'}
     _contains_methods.update(_contains_methods_ext)
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     _excluded_fields = VersionedObject._excluded_fields
     _fk = {
            '_project' : 'project_oid'
           }
-    _gridmap = [
-                ['Title',   'self.Title'],
-                ['Creator', 'self.creator_oid'],
-                ['Rev',     'self.Revision'],
-                ['Date',    'self.Date'],
-                ['Type',    'self.DocType']
-               ]
+#    _gridmap = [
+#                ['Title',   'self.Title'],
+#                ['Creator', 'self.creator_oid'],
+#                ['Rev',     'self.Revision'],
+#                ['Date',    'self.Date'],
+#                ['Type',    'self.DocType']
+#               ]
     # These are from the Dublin Core, and are computed attributes
     _properties = {
                    'Title'       : 'str',

Index: PanGalactic/pangalactic/utils/configuredisplay.py
diff -u PanGalactic/pangalactic/utils/configuredisplay.py:1.9 PanGalactic/pangalactic/utils/configuredisplay.py:1.10
--- PanGalactic/pangalactic/utils/configuredisplay.py:1.9	Thu Apr  8 12:27:55 2004
+++ PanGalactic/pangalactic/utils/configuredisplay.py	Wed Apr 14 16:48:27 2004
@@ -243,10 +243,11 @@
 
 
     def OnOK(self, event):
-        #self.SaveConfig()
-        #self.Parent.SetReturnCode(wxID_OK)
-        #self.Parent.Close()
         event.Skip()
+#        #self.SaveConfig()
+#        #self.Parent.SetReturnCode(wxID_OK)
+#        #self.Parent.Close()
+#        event.Skip()
         
     def OnRemoveAll(self, event):
         if self.GetShownWgt().GetItemCount() == 0:

Index: PanGalactic/pangalactic/client/modules/psm/searchframe.py
diff -u PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.34 PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.35
--- PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.34	Wed Apr  7 12:11:50 2004
+++ PanGalactic/pangalactic/client/modules/psm/searchframe.py	Wed Apr 14 16:48:25 2004
@@ -54,8 +54,8 @@
         # Part
         self.partgrid = basegrid.BaseGrid(self.searchnb,
                                           self.PART_SEARCH_GRID,
-                                          savename = 'searchframe_partgrid',
-                                          dbroot = self.dm.getRoot())
+                                          classname = "Part",
+                                          localdb = self.dm.localDB)
         self.partgrid.SetRowLabelSize(0)
         self.partgrid.EnableEditing(false)
         grid_tooltip = "A table of Parts found."
@@ -65,8 +65,8 @@
         # Model
         self.modelgrid = basegrid.BaseGrid(self.searchnb,
                                           self.MODEL_SEARCH_GRID,
-                                          savename = 'searchframe_modelgrid',
-                                          dbroot = self.dm.getRoot())
+                                          classname = "Model",
+                                          localdb = self.dm.localDB)
         self.modelgrid.SetRowLabelSize(0)
         self.modelgrid.EnableEditing(false)
         grid_tooltip = "A table of Models found."
@@ -76,8 +76,8 @@
         # Parts List 
         self.plgrid = basegrid.BaseGrid(self.searchnb,
                                         self.PL_SEARCH_GRID,
-                                        savename = 'searchframe_plgrid',
-                                        dbroot = self.dm.getRoot())
+                                        classname = "PartsList",
+                                        localdb = self.dm.localDB)
         self.plgrid.SetRowLabelSize(0)
         self.plgrid.EnableEditing(false)
         grid_tooltip = "A table of Parts Lists found."
@@ -87,8 +87,8 @@
         # General Document
         self.docgrid = basegrid.BaseGrid(self.searchnb,
                                          self.DOC_SEARCH_GRID,
-                                         savename = 'searchframe_docgrid',
-                                         dbroot = self.dm.getRoot())
+                                         classname = "Document",
+                                         localdb = self.dm.localDB)
         self.docgrid.EnableEditing(false)
         grid_tooltip = "A table of Documents found."
         self.docgrid.GetGridWindow().SetToolTip(wxToolTip(grid_tooltip))

Index: PanGalactic/pangalactic/client/modules/psm/pgefgrid.py
diff -u PanGalactic/pangalactic/client/modules/psm/pgefgrid.py:1.65 PanGalactic/pangalactic/client/modules/psm/pgefgrid.py:1.66
--- PanGalactic/pangalactic/client/modules/psm/pgefgrid.py:1.65	Tue Mar 23 14:32:19 2004
+++ PanGalactic/pangalactic/client/modules/psm/pgefgrid.py	Wed Apr 14 16:48:25 2004
@@ -8,11 +8,7 @@
 from wxPython.grid import *
 from wxPython.lib.gridmovers import wxGridColMover, EVT_GRID_COL_MOVE
 
-import pangalactic.enterprise.part as part
-
-from pangalactic.utils.configuregrid import *
 from pangalactic.utils import pgefevents
-
 import pangalactic.utils.pgefdatatable as pgefdatatable
 import pangalactic.utils.pdfoptions    as pdfoptions
 import pangalactic.utils.objectreport  as objectreport
@@ -42,8 +38,8 @@
     """wrapper for the grid that adds the drag and drop functionality to
     the base grid class.  Also adds the ability to set the labels for the
     grid columns and to fill a row of data given the data in a list format"""
-    def __init__(self, parent, id, savename = None, dbroot = None, intable = None):
-        basegrid.BaseGrid.__init__(self, parent, id, savename, dbroot, intable)
+    def __init__(self, parent, id, classname = None, localdb = None, intable = None):
+        basegrid.BaseGrid.__init__(self, parent, id, classname, localdb, intable)
             
     def OnRightDown(self, event):
 #        print "onrightdown"
@@ -71,27 +67,3 @@
             
             
 
-#---------------------------------------------------------------------------
-
-if __name__ == '__main__':
-    class MyApp(wxApp):
-        
-        def OnInit(self):
-            wxInitAllImageHandlers()
-
-            frame = wxFrame(NULL, -1, 'testing')
-            frame.grid = PgefGrid(frame, -1, savename = 'testgrid.ini')
-            frame.CentreOnParent()                              
-            frame.Show(true)
-            
-            for y in range(25):
-                x = part.Part()
-                frame.grid.AddData(x)
-            self.SetTopWindow(frame)
-            
-            return true
-    
-    #----------------------------------------------------------------------------
-
-    app = MyApp(0)
-    app.MainLoop()

Index: PanGalactic/pangalactic/enterprise/workflow/wftransition.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.10 PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.11
--- PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.10	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wftransition.py	Wed Apr 14 16:48:27 2004
@@ -8,7 +8,7 @@
     @param from_activity: The starting state (WfActivity) 
     """
 
-__version__ = "$Revision: 1.10 $"[11:-2]
+__version__ = "$Revision: 1.11 $"[11:-2]
 
 from pangalactic.utils import oid
 from pangalactic.enterprise.pgefobject import PgefObject
@@ -18,13 +18,11 @@
     This class is a link between two workflow states.
     """
     
-    _defaultgridmap = [["From Activity", "self.from_activity.name", "string", ""],
-                       ["To Activity",   "self.to_activity.name",   "string", ""]]
-
-
-    _map = [["From Activity", "self.from_activity.name", "string", ""],
-            ["To Activity",   "self.to_activity.name",   "string", ""]]
+#    _defaultgridmap = [["From Activity", "self.from_activity.name", "string", ""],
+#                       ["To Activity",   "self.to_activity.name",   "string", ""]]
 
+#    _map = [["From Activity", "self.from_activity.name", "string", ""],
+#            ["To Activity",   "self.to_activity.name",   "string", ""]]
 
     _properties = {"parentId" : "str"}
                    

Index: PanGalactic/pangalactic/utils/__init__.py
diff -u PanGalactic/pangalactic/utils/__init__.py:1.8 PanGalactic/pangalactic/utils/__init__.py:1.9
--- PanGalactic/pangalactic/utils/__init__.py:1.8	Fri Mar  5 16:18:15 2004
+++ PanGalactic/pangalactic/utils/__init__.py	Wed Apr 14 16:48:27 2004
@@ -9,7 +9,7 @@
 "basegrid",
 "configdbbrowser",
 "convertimage",
-"configuregrid",
+#"configuregrid",
 "configuredisplay",
 "customizegrid_gui",
 "datamanager",

Index: PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py:1.30 PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py:1.31
--- PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py:1.30	Fri Mar  5 16:18:13 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py	Wed Apr 14 16:48:27 2004
@@ -107,8 +107,9 @@
     def setupGrid(self, datalist, tablename):
         #print "process.setupgrid", tablename
         self.gridtable = wfdatatable.WfDataTable()
-        self.grid = WorkflowGrid(self, -1, savename = tablename,
-                                 dbroot = self.dm.getRoot(),
+        self.grid = WorkflowGrid(self, -1,
+                                 classname = "WfProcess",
+                                 localdb = self.dm.localDB,
                                  intable = self.gridtable)
         self.grid.SetColLabelSize(22)
         self.grid.SetSize(self.parent.GetClientSize())

Index: PanGalactic/pangalactic/enterprise/pgeffile.py
diff -u PanGalactic/pangalactic/enterprise/pgeffile.py:1.18 PanGalactic/pangalactic/enterprise/pgeffile.py:1.19
--- PanGalactic/pangalactic/enterprise/pgeffile.py:1.18	Wed Mar 17 15:52:14 2004
+++ PanGalactic/pangalactic/enterprise/pgeffile.py	Wed Apr 14 16:48:26 2004
@@ -1,12 +1,12 @@
-# $Id: pgeffile.py,v 1.18 2004/03/17 20:52:14 pbear Exp $
+# $Id: pgeffile.py,v 1.19 2004/04/14 20:48:26 pbear Exp $
 
 """
 A container for information about a file, including its path.
 
-@version: $Revision: 1.18 $
+@version: $Revision: 1.19 $
 """
 
-__version__ = "$Revision: 1.18 $"[11:-2]
+__version__ = "$Revision: 1.19 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -20,7 +20,7 @@
     _default_display_names = {}
     _default_display_types = {}
     _excluded_fields = []
-    _gridmap = []
+#    _gridmap = []
     _schema_ext = {
                    'location'        : 'str',
                    'user_file_name'  : 'str',

Index: PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.16 PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.17
--- PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.16	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py	Wed Apr 14 16:48:27 2004
@@ -27,6 +27,8 @@
 
 WF_COLOURKEY = wxNewId()
 
+COLOURED_ATTRS = ["_activity_due_date_str"]
+
 class WfInstanceOverview(WfProcessOverview):
     """
     This is a display of locally stored WfProcess objects.
@@ -103,9 +105,11 @@
         #print "instance.setupgrid", tablename
         self.gridtable = wfdatatable.WfDataTable()
         if len(datalist) > 0:
-            self.gridtable.setGridMap(datalist[0]._instancegridmap)
-            self.grid = WorkflowGrid(self, -1, savename = tablename,
-                                     dbroot = self.dm.getRoot(), intable = self.gridtable)
+            #self.gridtable.setGridMap(datalist[0]._instancegridmap)
+            self.grid = WorkflowGrid(self, -1,
+                                     classname = "WfProcess",
+                                     localdb = self.dm.localDB,
+                                     intable = self.gridtable)
             self.grid.SetSize(self.parent.GetClientSize())
             self.FillGrid(datalist)
             self.setColourByDueDate(datalist)
@@ -115,17 +119,21 @@
         
         
     def setColourByDueDate(self, wfobj_list):
-        msg = "alertgrid.setcolour"
-        #print msg
+        msg = "wfinst.setcolour"
+        print msg
         somecol = None
-        displaymap = wfobj_list[0]._instancegridmap
+        displaymap = wfobj_list[0]._instance_display_order
+        print displaymap
 
+        #for ndx in range(len(displaymap)):
         for ndx in range(len(displaymap)):
-            colinfo = displaymap[ndx] 
-            if colinfo[3] == "colour":
+            attrname = displaymap[ndx]
+            print "attrname", attrname
+            if attrname in COLOURED_ATTRS:
                 somecol = ndx
                 break
 
+        print "col", somecol
         if somecol == None:
             return
 
@@ -163,5 +171,5 @@
             forecolour = workflow_wizard.colourlist[colour_ndx][1]
             self.grid.SetCellBackgroundColour(row, somecol, backcolour)
             self.grid.SetCellTextColour(row, somecol, forecolour)
-            #print msg
+            print msg
 

Index: PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py
diff -u PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py:1.14 PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py:1.15
--- PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py:1.14	Fri Mar  5 16:18:13 2004
+++ PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py	Wed Apr 14 16:48:27 2004
@@ -49,7 +49,7 @@
     ### BaseGrid has a different rightclick menu.  An UpdateData() has been
     ### added.
 
-    def __init__(self, parent, id, savename, dbroot, intable):
+    def __init__(self, parent, id, classname, localdb, intable):
         """
         @type parent: wxPanel (usually)
         @param parent: The parent widget for this grid.
@@ -57,17 +57,14 @@
         @type id: integer
         @param id: -1.  ignored.
 
-        @type savename: string
-        @param savename: unique name for this grid for local cache.
-
-        @type dbroot: @see: L{LocalStorage <pangalactic.utils.localstorage>}
-        @param dbroot: A reference to the ubiquitous local cache.
+        @type localdb: @see: L{LocalStorage <pangalactic.utils.localstorage>}
+        @param localdb: A reference to the ubiquitous local cache.
 
         @type intable: wxGridTableBase
         @param intable: A reference to an existing tablebase class.  If None, a PgefDataTable will be instantiated.
         """
         
-        basegrid.BaseGrid.__init__(self, parent, id, savename, dbroot, intable)
+        basegrid.BaseGrid.__init__(self, parent, id, classname, localdb, intable)
 
         self.SetSelectionMode(1) # 1 is wxGridSelectRow
         self.SelectedRow = -1

Index: PanGalactic/pangalactic/enterprise/person.py
diff -u PanGalactic/pangalactic/enterprise/person.py:1.15 PanGalactic/pangalactic/enterprise/person.py:1.16
--- PanGalactic/pangalactic/enterprise/person.py:1.15	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/person.py	Wed Apr 14 16:48:26 2004
@@ -1,4 +1,4 @@
-# $Id: person.py,v 1.15 2004/03/10 14:12:28 waterbug Exp $
+# $Id: person.py,v 1.16 2004/04/14 20:48:26 pbear Exp $
 
 """
 A human being.
@@ -17,7 +17,7 @@
     _default_display_names = {}
     _default_display_types = {}
     _excluded_fields = []
-    _gridmap = []
+#    _gridmap = []
     _properties = PgefObject._properties.copy()
     _required = ['id',
                  'fname',

Index: PanGalactic/pangalactic/client/modules/psm/checkedoutgrid.py
diff -u PanGalactic/pangalactic/client/modules/psm/checkedoutgrid.py:1.16 PanGalactic/pangalactic/client/modules/psm/checkedoutgrid.py:1.17
--- PanGalactic/pangalactic/client/modules/psm/checkedoutgrid.py:1.16	Fri Mar  5 16:18:10 2004
+++ PanGalactic/pangalactic/client/modules/psm/checkedoutgrid.py	Wed Apr 14 16:48:25 2004
@@ -1,14 +1,13 @@
-import pangalactic.utils.basegrid as basegrid
-import pangalactic.utils.toolframe as toolframe
-#import pgefgrid
-#import pangalactic.enterprise.productmodelversion # import dataobjects.item
-#from wxPython.wx import wxToolTip_Enable, wxSize, true, false, EVT_CLOSE, wxDefaultPosition, wxDefaultSize
 from wxPython.wx import wxSize
 
+import pangalactic.utils.basegrid as basegrid
+import pangalactic.utils.toolframe as toolframe
 
 class CheckedOutGrid(toolframe.toolFrame):
     def __init__(self, parent, datamanager = None):
-        toolframe.toolFrame.__init__(self, parent, -1, "Locally cached object library", size = wxSize(700, 500))
+        toolframe.toolFrame.__init__(self, parent, -1,
+                                     "Locally cached object library",
+                                     size = wxSize(700, 500))
         self.dm = datamanager
         self.menuBar.SetLabel(toolframe.ID_FILE_EXIT, '&Close')
         self.menuBar.SetHelpString(toolframe.ID_FILE_EXIT, "Close this window")
@@ -17,6 +16,7 @@
         currpos.x += 150
         currpos.y -= 80
         self.Move(currpos)
-        self.grid = basegrid.BaseGrid(self, -1, savename = 'checkout_grid',
-                                      dbroot = self.dm.getRoot())
+        self.grid = basegrid.BaseGrid(self, -1,
+                                      savename = 'checkout_grid',
+                                      localdb = self.dm.localDB)
         self.grid.SetRowLabelSize(0)

Index: PanGalactic/pangalactic/client/tests/test_partslist.py
diff -u PanGalactic/pangalactic/client/tests/test_partslist.py:1.11 PanGalactic/pangalactic/client/tests/test_partslist.py:1.12
--- PanGalactic/pangalactic/client/tests/test_partslist.py:1.11	Fri Mar  5 16:18:12 2004
+++ PanGalactic/pangalactic/client/tests/test_partslist.py	Wed Apr 14 16:48:26 2004
@@ -32,8 +32,8 @@
         assert self.obj1._ColumnMappingID == -1, 'Bad initial value for ColumnMappingID'
         assert len(self.obj1._ColumnInfo.keys()) == 0, 'Bad initial value for ColumnInfo'
     
-    def testGridMap(self):
-        assert len(self.obj1._gridmap) > 0, 'Missing data in Partslist._gridmap'
+#    def testGridMap(self):
+#        assert len(self.obj1._gridmap) > 0, 'Missing data in Partslist._gridmap'
         
     def testRequiredList(self):
         assert len(self.obj1._required) > 0, 'Missing required fields in Partslist._required'
@@ -43,7 +43,7 @@
     partslist_suite = unittest.TestSuite()
     partslist_suite.addTest(PartsListTestCase("Title"))
     partslist_suite.addTest(PartsListTestCase("testDefaultObjectValues"))
-    partslist_suite.addTest(PartsListTestCase("testGridMap"))
+#    partslist_suite.addTest(PartsListTestCase("testGridMap"))
     partslist_suite.addTest(PartsListTestCase("testRequiredList"))
     partslist_suite.addTest(PartsListTestCase("testUserAccessList"))
     partslist_suite.addTest(PartsListTestCase("testDefaultValues"))

Index: PanGalactic/pangalactic/enterprise/ontoproperty.py
diff -u PanGalactic/pangalactic/enterprise/ontoproperty.py:1.1 PanGalactic/pangalactic/enterprise/ontoproperty.py:1.2
--- PanGalactic/pangalactic/enterprise/ontoproperty.py:1.1	Wed Mar 10 13:34:10 2004
+++ PanGalactic/pangalactic/enterprise/ontoproperty.py	Wed Apr 14 16:48:26 2004
@@ -1,4 +1,4 @@
-# $Id: ontoproperty.py,v 1.1 2004/03/10 18:34:10 waterbug Exp $
+# $Id: ontoproperty.py,v 1.2 2004/04/14 20:48:26 pbear Exp $
 
 """
 An attribute whose definition can be managed.
@@ -18,9 +18,10 @@
     """
     # TODO: add attributes used in IEC 61360 and RosettaNet
     # dictionaries
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     # pgef_oid, create_datetime, and mod_datetime are excluded
     # fields because they receive non-null default values at
     # initialization time.
@@ -31,10 +32,10 @@
                        ]
     _excluded_dump = []
     _fk = {}
-    _gridmap = [ ['ID', 'self.id'],
-                 ['Context' , 'self.id_context'],
-                 ['Name' , 'self.name'],
-                 ['Definition' , 'self.long_description'] ]
+#    _gridmap = [ ['ID', 'self.id'],
+#                 ['Context' , 'self.id_context'],
+#                 ['Name' , 'self.name'],
+#                 ['Definition' , 'self.long_description'] ]
     _properties = {}
     _required = []
     _refs = {}

Index: PanGalactic/pangalactic/client/fnord.py
diff -u PanGalactic/pangalactic/client/fnord.py:1.91 PanGalactic/pangalactic/client/fnord.py:1.92
--- PanGalactic/pangalactic/client/fnord.py:1.91	Thu Apr  8 12:27:54 2004
+++ PanGalactic/pangalactic/client/fnord.py	Wed Apr 14 16:48:25 2004
@@ -1,13 +1,13 @@
 #!/usr/bin/env python 
 
-# $Id: fnord.py,v 1.91 2004/04/08 16:27:54 pbear Exp $
+# $Id: fnord.py,v 1.92 2004/04/14 20:48:25 pbear Exp $
 
 """
 Main application module for the PGEF desktop client.
 
-@version: $Revision: 1.91 $
+@version: $Revision: 1.92 $
 """
-__version__ = "$Revision: 1.91 $"[11:-2]
+__version__ = "$Revision: 1.92 $"[11:-2]
 
 from wxPython.wx import *
 from wxPython.grid import *
@@ -643,7 +643,6 @@
         dbb_frame.menuBar.SetLabel(toolframe.ID_FILE_EXIT, '&Close')
         dbb_frame.menuBar.SetHelpString(toolframe.ID_FILE_EXIT, "Close this window")
         dbb_frame.mainpanel = dbbrowser.zodbbrowser(dbb_frame, -1,
-#                                                    zodbroot = self.dm.getRoot(),
                                                     localdb = self.dm.localDB)
         config_access = self.dm.getConfigAccess()
         dbb_frame.mainpanel.FillChoice(config_access)

Index: PanGalactic/pangalactic/enterprise/part.py
diff -u PanGalactic/pangalactic/enterprise/part.py:1.4 PanGalactic/pangalactic/enterprise/part.py:1.5
--- PanGalactic/pangalactic/enterprise/part.py:1.4	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/part.py	Wed Apr 14 16:48:26 2004
@@ -1,10 +1,10 @@
-# $Id: part.py,v 1.4 2004/03/10 14:12:28 waterbug Exp $
+# $Id: part.py,v 1.5 2004/04/14 20:48:26 pbear Exp $
 
 """
 A product or some specifiable thing.
 """
 
-__version__ = "$Revision: 1.4 $"[11:-2]
+__version__ = "$Revision: 1.5 $"[11:-2]
 
 from pangalactic.enterprise.project import Project
 from pangalactic.enterprise.versionedobject import VersionedObject
@@ -15,9 +15,9 @@
     or description of a product or some specifiable thing.  I may
     be versioned.
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     # These are fields that are excluded from copying or
     # comparisions between Part objects
     _excluded_fields = ['create_datetime', 'pger_create_datetime', 'pgef_oid']
@@ -25,14 +25,14 @@
     # These are the fields that will appear in when an item is placed in a grid.
     # The format for each field is [ Label, attribute, field_type ].
     _fk = VersionedObject._fk.copy()
-    _gridmap = [
-                ['Part\nNumber','self.id', 'string'],
-                ['Name\nCode','self.name', 'string'],
-                ['POC','self.owner_oid', 'string'],
-                ['Name','self.short_description', 'string'],
-                ['Created','self.create_datetime', 'string'],
-                ['Creator','self.creator_oid', 'string']
-               ]
+#    _gridmap = [
+#                ['Part\nNumber','self.id', 'string'],
+#                ['Name\nCode','self.name', 'string'],
+#                ['POC','self.owner_oid', 'string'],
+#                ['Name','self.short_description', 'string'],
+#                ['Created','self.create_datetime', 'string'],
+#                ['Creator','self.creator_oid', 'string']
+#               ]
     _refs = VersionedObject._refs.copy()
     # _required specifies the minimum fields
     _required = [
@@ -92,6 +92,8 @@
         project = getattr(self, '_project', None)
         if project:
             self.project_oid = project.pgef_oid
+        self._display_map = self.getDisplayMap()
+
 
     def popTestData(self):
         """

Index: PanGalactic/pangalactic/enterprise/partslist.py
diff -u PanGalactic/pangalactic/enterprise/partslist.py:1.17 PanGalactic/pangalactic/enterprise/partslist.py:1.18
--- PanGalactic/pangalactic/enterprise/partslist.py:1.17	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/partslist.py	Wed Apr 14 16:48:26 2004
@@ -1,11 +1,11 @@
-# $Id: partslist.py,v 1.17 2004/03/10 14:12:28 waterbug Exp $
+# $Id: partslist.py,v 1.18 2004/04/14 20:48:26 pbear Exp $
 
 """
 A Document consisting of a collection of Part references and
 associated data.
 """
 
-__version__ = "$Revision: 1.17 $"[11:-2]
+__version__ = "$Revision: 1.18 $"[11:-2]
 
 from pangalactic.enterprise.document import Document
 
@@ -20,13 +20,13 @@
     _default_display_types = {}
     _excluded_fields = []
     _fk = {}
-    _gridmap = [
-                ['Partslist ID', 'self.id', 'string'],
-                ['Project\nName Code', 'self._project.id', 'string'],
-                ['Identifier', 'self.id', 'string'],
-                ['Point of\nContact', 'self.owner_oid', 'string'],
-                ['Version', 'self.version', 'string']
-               ]
+#    _gridmap = [
+#                ['Partslist ID', 'self.id', 'string'],
+#                ['Project\nName Code', 'self._project.id', 'string'],
+#                ['Identifier', 'self.id', 'string'],
+#                ['Point of\nContact', 'self.owner_oid', 'string'],
+#                ['Version', 'self.version', 'string']
+#               ]
     _properties = {
                    'PointofContact' : 'str',
                    'Identifier'     : 'str',

Index: PanGalactic/pangalactic/enterprise/role.py
diff -u PanGalactic/pangalactic/enterprise/role.py:1.7 PanGalactic/pangalactic/enterprise/role.py:1.8
--- PanGalactic/pangalactic/enterprise/role.py:1.7	Sun Mar  7 01:52:41 2004
+++ PanGalactic/pangalactic/enterprise/role.py	Wed Apr 14 16:48:26 2004
@@ -1,20 +1,20 @@
-# $Id: role.py,v 1.7 2004/03/07 06:52:41 waterbug Exp $
+# $Id: role.py,v 1.8 2004/04/14 20:48:26 pbear Exp $
 
 """
 An set of user privileges for a PGEF application.
 """
 
-__version__ = "$Revision: 1.7 $"[11:-2]
+__version__ = "$Revision: 1.8 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
 class Role(PgefObject):
     """
-    An set of user privileges for a PGEF application.
+    A set of user privileges for a PGEF application.
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     # pgef_oid, create_datetime, and mod_datetime are excluded
     # fields because they receive non-null default values at
     # initialization time.
@@ -25,10 +25,10 @@
                        ]
     _excluded_dump = []
     _fk = {}
-    _gridmap = [ ['UserID', 'self.UserID', 'string'],
-                 ['Role Code' , 'self.RollCode', 'string'],
-                 ['Project Name\nCode', 'self.project', 'string']
-               ]
+#    _gridmap = [ ['UserID', 'self.UserID', 'string'],
+#                 ['Role Code' , 'self.RollCode', 'string'],
+#                 ['Project Name\nCode', 'self.project', 'string']
+#               ]
     _properties = {}
     _required = []
     _refs = {}

Index: PanGalactic/pangalactic/client/tests/test_pgefobject.py
diff -u PanGalactic/pangalactic/client/tests/test_pgefobject.py:1.9 PanGalactic/pangalactic/client/tests/test_pgefobject.py:1.10
--- PanGalactic/pangalactic/client/tests/test_pgefobject.py:1.9	Fri Mar  5 16:18:12 2004
+++ PanGalactic/pangalactic/client/tests/test_pgefobject.py	Wed Apr 14 16:48:26 2004
@@ -42,15 +42,15 @@
         assert result == False , 'Object should not have been empty'
         self.obj1.creator = ''
         
-    def testConvertDataToList(self):
-        """Check to see that ConvertDataToList returns the proper number of entries"""
-        temp = self.obj1.convertDataToList()
-        assert len(temp) == len(self.obj1._gridmap)
+#    def testConvertDataToList(self):
+#        """Check to see that ConvertDataToList returns the proper number of entries"""
+#        temp = self.obj1.convertDataToList()
+#        assert len(temp) == len(self.obj1._gridmap)
         
-    def testDataMemberNames(self):
-        """Check to make sure that we have headings for all columns"""
-        temp = self.obj1.DataMemberNames()
-        assert len(temp) == len(self.obj1._gridmap)
+#    def testDataMemberNames(self):
+#        """Check to make sure that we have headings for all columns"""
+#        temp = self.obj1.DataMemberNames()
+#        assert len(temp) == len(self.obj1._gridmap)
         
     def testValidate(self):
         """Check to make sure that if all required fields are not filled in that we receive
@@ -76,8 +76,8 @@
     suite.addTest(PGEFObjectTestCase("testIsEqual"))
     suite.addTest(PGEFObjectTestCase("testIsEmpty"))
     suite.addTest(PGEFObjectTestCase("testIsNotEmpty"))
-    suite.addTest(PGEFObjectTestCase("testConvertDataToList"))
-    suite.addTest(PGEFObjectTestCase("testDataMemberNames"))
+#    suite.addTest(PGEFObjectTestCase("testConvertDataToList"))
+#    suite.addTest(PGEFObjectTestCase("testDataMemberNames"))
     suite.addTest(PGEFObjectTestCase("testValidate"))
     suite.addTest(PGEFObjectTestCase("testBuild"))
     
@@ -89,4 +89,4 @@
 
 
 if __name__ == '__main__':
-    main()
\ No newline at end of file
+    main()

Index: PanGalactic/pangalactic/enterprise/versionedobject.py
diff -u PanGalactic/pangalactic/enterprise/versionedobject.py:1.4 PanGalactic/pangalactic/enterprise/versionedobject.py:1.5
--- PanGalactic/pangalactic/enterprise/versionedobject.py:1.4	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/versionedobject.py	Wed Apr 14 16:48:26 2004
@@ -1,11 +1,11 @@
-# $Id: versionedobject.py,v 1.4 2004/03/10 14:12:28 waterbug Exp $
+# $Id: versionedobject.py,v 1.5 2004/04/14 20:48:26 pbear Exp $
 
 """
 A thing which evolves in a set of discrete, identified
 incarnations.
 """
 
-__version__ = "$Revision: 1.4 $"[11:-2]
+__version__ = "$Revision: 1.5 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 from pangalactic.enterprise.project import Project
@@ -17,24 +17,27 @@
     """
     _contains = {}
     _contains_methods = {}
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+
     # These are fields that are excluded from copying or
     # comparisions between ProductMaster Objects
     _excluded_fields = ['create_datetime', 'pger_create_datetime', 'pgef_oid']
     _excluded_dump = ['Mark', 'Drag']
-    # These are the fields that will appear in when an item is placed in a grid.
-    # The format for each field is [ Label, attribute, field_type ].
+
     _fk = {
            '_project' : 'project_oid'
           }
-    _gridmap = [
-                ['Name\nCode','self.name', 'string'],
-                ['Name','self.short_description', 'string'],
-                ['Created','self.create_datetime', 'string'],
-                ['Creator','self.creator_oid', 'string']
-               ]
+
+    # These are the fields that will appear in when an item is placed in a grid.
+    # The format for each field is [ Label, attribute, field_type ].
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
+#    _gridmap = [
+#                ['Name\nCode','self.name', 'string'],
+#                ['Name','self.short_description', 'string'],
+#                ['Created','self.create_datetime', 'string'],
+#                ['Creator','self.creator_oid', 'string']
+#               ]
     _schema_ext = {
                    'iteration'              : 'int',
                    'version'                : 'str',

Index: PanGalactic/pangalactic/client/tests/test_product.py
diff -u PanGalactic/pangalactic/client/tests/test_product.py:1.8 PanGalactic/pangalactic/client/tests/test_product.py:1.9
--- PanGalactic/pangalactic/client/tests/test_product.py:1.8	Fri Mar  5 16:18:12 2004
+++ PanGalactic/pangalactic/client/tests/test_product.py	Wed Apr 14 16:48:26 2004
@@ -23,8 +23,8 @@
         assert self.obj1.has_parts_lists_flag == '', 'invalid initial value for Item.has_parts_lists_flag'
         assert self.obj1.has_parts_flag == '', 'invalid initial value for Item.has_parts_flag'
     
-    def testGridMap(self):
-        assert len(self.obj1._gridmap) > 0, 'Missing data in Item._gridmap'
+#    def testGridMap(self):
+#        assert len(self.obj1._gridmap) > 0, 'Missing data in Item._gridmap'
         
     def testRequiredList(self):
         assert len(self.obj1._required) > 0, 'Missing required fields in Item._required'
@@ -35,7 +35,7 @@
     item_suite = unittest.TestSuite()
     item_suite.addTest(ItemTestCase("Title"))
     item_suite.addTest(ItemTestCase("testDefaultObjectValues"))
-    item_suite.addTest(ItemTestCase("testGridMap"))
+#    item_suite.addTest(ItemTestCase("testGridMap"))
     item_suite.addTest(ItemTestCase("testRequiredList"))
     item_suite.addTest(ItemTestCase("testUserAccessList"))
     item_suite.addTest(ItemTestCase("testDefaultValues"))

Index: PanGalactic/pangalactic/client/modules/psm/psmtool.py
diff -u PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.159 PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.160
--- PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.159	Wed Apr  7 16:11:37 2004
+++ PanGalactic/pangalactic/client/modules/psm/psmtool.py	Wed Apr 14 16:48:25 2004
@@ -9,7 +9,7 @@
 This module is the main application code for the pgef client interface
 """
 
-__version__ = "$Revision: 1.159 $"[11:-2]
+__version__ = "$Revision: 1.160 $"[11:-2]
 
 
 import os
@@ -66,7 +66,7 @@
     CAN_EXPORT_PROPERTIES = True
 
 except ImportError:
-    print "NOTE: Export of properties to MS Excel is unavailable."
+    print "NOTE: Export of properties to MS Excel is not available."
     CAN_EXPORT_PROPERTIES = False
     
     
@@ -124,17 +124,20 @@
         self.grid_notebook = wxNotebook(self, -1, wxDefaultPosition, wxSize(200, 200)) 
     
         #Create grid to hold Models
+        print "\nModelGrid"
         self.modelgrid = pgefgrid.PgefGrid(self.grid_notebook, -1,
-                                           savename = 'psmtool_modelgrid',
-                                           dbroot = self.dm.getRoot())
+                                           classname = "Model",
+                                           localdb = self.dm.localDB)
         self.modelgrid.EnableEditing(False)
         self.grid_notebook.AddPage(self.modelgrid, "Models")
-        self.modelgrid.Fit()
+        self.modelgrid.Fit() # remove funny blank space in the first row of the grid,
+                             # if it initially has a scrollbar
         
         # Create Grid to hold Parts
+        print "\nPartGrid"
         self.itemgrid = pgefgrid.PgefGrid(self.grid_notebook, -1,
-                                          savename = 'psmtool_main_grid',
-                                          dbroot = self.dm.getRoot())
+                                          classname = "Part",
+                                          localdb = self.dm.localDB)
         grid_tooltip = "A tabular display of the data in the parts and models " + \
                        "of the currently selected project.\n" + \
                        "Doubleclick on a part to display the Part Editor.\n" + \

Index: PanGalactic/pangalactic/enterprise/organization.py
diff -u PanGalactic/pangalactic/enterprise/organization.py:1.14 PanGalactic/pangalactic/enterprise/organization.py:1.15
--- PanGalactic/pangalactic/enterprise/organization.py:1.14	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/organization.py	Wed Apr 14 16:48:26 2004
@@ -1,4 +1,4 @@
-# $Id: organization.py,v 1.14 2004/03/10 14:12:28 waterbug Exp $
+# $Id: organization.py,v 1.15 2004/04/14 20:48:26 pbear Exp $
 
 """
 A business entity comprised of personnel and other resources.
@@ -12,16 +12,16 @@
     I encapsulate all information needed by PGEF about an
     organization.
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     # _excluded_fields are those inherited from PgefObject
-    _gridmap = [
-                ['ID', 'self.id'],
-                ['Name' , 'self.Name'], # ideally, name code ...
-                ['City' , 'self.city'],
-                ['State' , 'self.state_or_country']
-               ]
+#    _gridmap = [
+#                ['ID', 'self.id'],
+#                ['Name' , 'self.Name'], # ideally, name code ...
+#                ['City' , 'self.city'],
+#                ['State' , 'self.state_or_country']
+#               ]
     _required = ['Creator',
                  'Identifier',
                  'Type']

Index: PanGalactic/pangalactic/enterprise/workflow/wffactory.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.17 PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.18
--- PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.17	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wffactory.py	Wed Apr 14 16:48:27 2004
@@ -10,16 +10,20 @@
 
 DEFAULT_WORKFLOW0 = ("WF0 - generally used for GIDEP Alerts and Problem Advisories",
                     
-                     {0:{"activity":"Initiated", "duration":"28",
+                     {0:{"activity":"Initiated",
+                         "duration":"28",
                          "late":"7",  "very_late":"14", "lost_cause":"21",
                          "description":"Initial Draft"},
-                      1:{"activity":"Draft",     "duration":"28",
+                      1:{"activity":"Draft",
+                         "duration":"28",
                          "late":"15", "very_late":"30", "lost_cause":"45",
                          "description":"Final Draft"},
-                      2:{"activity":"Approved",  "duration":"14",
+                      2:{"activity":"Approved",
+                         "duration":"14",
                          "late":"30", "very_late":"60", "lost_cause":"90",
                          "description":"Approved for Release"},
-                      3:{"activity":"Released",  "duration":"21",
+                      3:{"activity":"Released",
+                         "duration":"21",
                          "late":"10", "very_late":"20", "lost_cause":"30",
                          "description":"Released to Distribution List"}},
                     
@@ -29,13 +33,16 @@
 
 DEFAULT_WORKFLOW1 = ("WF1 - generally used for NASA Alerts and Advisories",
                     
-                     {0:{"activity":"Initiated",     "duration":"30",
+                     {0:{"activity":"Initiated",
+                         "duration":"30",
                          "late":"30", "very_late":"45", "lost_cause":"60",
                          "description":"Draft"},
-                      1:{"activity":"Approved",  "duration":"10",
+                      1:{"activity":"Approved",
+                         "duration":"10",
                          "late":"10", "very_late":"15", "lost_cause":"20",
                          "description":"Approved for Release"},
-                      2:{"activity":"Released",  "duration":"30",
+                      2:{"activity":"Released",
+                         "duration":"30",
                          "late":"10", "very_late":"20", "lost_cause":"30",
                          "description":"Released to Distribution List"}},
                     

Index: PanGalactic/pangalactic/enterprise/acu.py
diff -u PanGalactic/pangalactic/enterprise/acu.py:1.6 PanGalactic/pangalactic/enterprise/acu.py:1.7
--- PanGalactic/pangalactic/enterprise/acu.py:1.6	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/acu.py	Wed Apr 14 16:48:26 2004
@@ -1,4 +1,4 @@
-# $Id: acu.py,v 1.6 2004/03/10 14:12:28 waterbug Exp $
+# $Id: acu.py,v 1.7 2004/04/14 20:48:26 pbear Exp $
 
 """
 Assembly Component Usage (ACU)
@@ -7,10 +7,10 @@
 I{component}) and another Model (the I{assembly}) of which it
 is a constituent part.
 
-@version: $Revision: 1.6 $
+@version: $Revision: 1.7 $
 """
 
-__version__ = "$Revision: 1.6 $"[11:-2]
+__version__ = "$Revision: 1.7 $"[11:-2]
 
 from pangalactic.utils import oid
 from pangalactic.enterprise.pgefobject import PgefObject
@@ -30,20 +30,20 @@
     I{component}) and another Model (the I{assembly}) of which it
     is a constituent part.
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     # _excluded_fields are those inherited from PgefObject
     _fk = {
            '_assembly'  : 'assembly_oid',
            '_component' : 'component_oid'
           }
-    _gridmap =  [
-                 ['Assembly PN', 'self.assembly_oid', 'string'],
-                 ['Component PN', 'self.component_oid', 'string'],
-                 ['Delete', 'self.Delete', 'boolean'],
-                 ['Ref Designator', 'self.ref_designator', 'string']
-                ]
+#    _gridmap =  [
+#                 ['Assembly PN', 'self.assembly_oid', 'string'],
+#                 ['Component PN', 'self.component_oid', 'string'],
+#                 ['Delete', 'self.Delete', 'boolean'],
+#                 ['Ref Designator', 'self.ref_designator', 'string']
+#                ]
     _pk = ['pgef_oid']
     _properties = PgefObject._properties.copy()
     _schema = PgefObject._schema.copy()

Index: PanGalactic/pangalactic/enterprise/model.py
diff -u PanGalactic/pangalactic/enterprise/model.py:1.5 PanGalactic/pangalactic/enterprise/model.py:1.6
--- PanGalactic/pangalactic/enterprise/model.py:1.5	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/model.py	Wed Apr 14 16:48:26 2004
@@ -1,17 +1,18 @@
-# $Id: model.py,v 1.5 2004/03/10 14:12:28 waterbug Exp $
+# $Id: model.py,v 1.6 2004/04/14 20:48:26 pbear Exp $
 
 """
 A representation or specification of a thing.
 
-@version: $Revision: 1.5 $
+@version: $Revision: 1.6 $
 """
 
-__version__ = "$Revision: 1.5 $"[11:-2]
+__version__ = "$Revision: 1.6 $"[11:-2]
 
 from pangalactic.enterprise.project import Project
 from pangalactic.enterprise.versionedobject import VersionedObject
 from pangalactic.enterprise.part import Part
 from pangalactic.utils import pgefexceptions
+from pangalactic.utils.utils import compareSequence1
 
 
 class Model(VersionedObject):
@@ -19,28 +20,31 @@
     A representation or specification of a thing (the thing may
     or may not be a Part).
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+
     # These are fields that are excluded from copying or
     # comparisions between Model objects
     _excluded_fields = ['create_datetime', 'pger_create_datetime', 'pgef_oid']
     _excluded_dump = ['Mark', 'Drag']
-    # These are the fields that will appear in when an item is
-    # placed in a grid.  The format for each field is [ Label,
-    # attribute, field_type ].
+
     _fk = VersionedObject._fk.copy()
     _fk_ext = {
                '_of_part' : 'of_part_oid'
               }
     _fk.update(_fk_ext)
-    _gridmap = [
-                ['Part\nNumber', 'self._of_part.id', 'string'],
-                ['Model', 'self.id', 'string'],
-                ['Model\nName\nCode', 'self.name', 'string'],
-                ['Model\nName', 'self.short_description', 'string'],
-                ['Model\nOwner', 'self.owner_oid', 'string']
-               ]
+
+    # These are the fields that will appear in when an item is
+    # placed in a grid.  The format for each field is [ Label,
+    # attribute, field_type ].
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
+#    _gridmap = [
+#                ['Part\nNumber', 'self._of_part.id', 'string'],
+#                ['Model', 'self.id', 'string'],
+#                ['Model\nName\nCode', 'self.name', 'string'],
+#                ['Model\nName', 'self.short_description', 'string'],
+#                ['Model\nOwner', 'self.owner_oid', 'string']
+#               ]
     # _required specifies the minimum fields that must be filled
     # in before a Model can be saved.
     _required = ['id', 'name']
@@ -93,5 +97,6 @@
             if self._project == 'NOPROJECT':
                 self._project = self._of_part._project
                 self.project_oid = self._of_part.project_oid
+        self._display_map = self.getDisplayMap()
 
 

Index: PanGalactic/pangalactic/enterprise/workflow/wfactivity.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.19 PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.20
--- PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.19	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfactivity.py	Wed Apr 14 16:48:27 2004
@@ -23,21 +23,25 @@
     to have a state that is a wfprocess.  Eventually is _NOT_ now.
     
     Any methods required by WfMC are commented as such.
-    
-    @type _defaultgridmap: list
-    @cvar _defaultgridmap: default list of attributes which are displayed in the wizard.
-
-    @type _gridmap: list of lists
-    @cvar _gridmap: defines which attributes are to be displayed in the wizard.
     """
+
+    _default_display_names = {"activity"    : "Activity",
+                              "duration"    : "Time Frame\n(days)",
+                              "description" : "Description"}
+    
+    _default_display_order = ["activity",
+                              "duration",
+                              "description"]
     
-    _defaultgridmap = [["Activity",           "self.fields['activity']",           "string", ""],
-                       ["Time Frame\n(days)", "self.fields['time frame\n(days)']", "string", ""],
-                       ["Description",        "self.fields['description']",        "string", ""]]
-
-    _gridmap = [["Activity",           "self.fields['activity']",           "string", ""],
-                ["Time Frame\n(days)", "self.fields['time frame\n(days)']", "string", ""],
-                ["Description",        "self.fields['description']",        "string", ""]]
+    _default_display_types = {}
+    
+#    _defaultgridmap = [["Activity",           "self.fields['activity']",           "string", ""],
+#                       ["Time Frame\n(days)", "self.fields['time frame\n(days)']", "string", ""],
+#                       ["Description",        "self.fields['description']",        "string", ""]]
+#
+#    _gridmap = [["Activity",           "self.fields['activity']",           "string", ""],
+#                ["Time Frame\n(days)", "self.fields['time frame\n(days)']", "string", ""],
+#                ["Description",        "self.fields['description']",        "string", ""]]
 
     _properties = {"parent_id" : "str",
                    "can_start" : "str"}
@@ -68,6 +72,9 @@
         self.can_start = 0
         self.fields = fields
 
+        self._display_map = self.getDisplayMap()
+
+
     def getDuration(self):
         return int(self.fields["duration"])
 
@@ -190,6 +197,9 @@
 
     def setFields(self, fields):
         self.fields = fields
+        self.activity = self.fields["activity"]
+        self.duration = self.fields["duration"]
+        self.description = self.fields["description"]
 
         
     def setProcessId(self, oid):

Index: PanGalactic/pangalactic/enterprise/dcu.py
diff -u PanGalactic/pangalactic/enterprise/dcu.py:1.8 PanGalactic/pangalactic/enterprise/dcu.py:1.9
--- PanGalactic/pangalactic/enterprise/dcu.py:1.8	Wed Mar 10 09:12:28 2004
+++ PanGalactic/pangalactic/enterprise/dcu.py	Wed Apr 14 16:48:26 2004
@@ -1,4 +1,4 @@
-# $Id: dcu.py,v 1.8 2004/03/10 14:12:28 waterbug Exp $
+# $Id: dcu.py,v 1.9 2004/04/14 20:48:26 pbear Exp $
 
 """
 Document Component Usage (DCU)
@@ -7,10 +7,10 @@
 I{component}) and another Document (the I{assembly}) in which it
 occurs as a part.
 
-@version: $Revision: 1.8 $
+@version: $Revision: 1.9 $
 """
 
-__version__ = "$Revision: 1.8 $"[11:-2]
+__version__ = "$Revision: 1.9 $"[11:-2]
 
 from pangalactic.enterprise.document import Document
 from pangalactic.enterprise.pgefobject import PgefObject
@@ -23,16 +23,16 @@
     I{component}) and another Document (the I{assembly}) in which
     it occurs as a part.
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
+#    _default_display_order = []
+#    _default_display_names = {}
+#    _default_display_types = {}
     # _excluded_fields are those inherited from PgefObject
     _fk = {
            '_assembly' :  'assembly_oid',
            '_component' : 'component_oid'
           }
     _excluded_dump = []
-    _gridmap = []
+#    _gridmap = []
     _pk = ['pgef_oid']
     _properties = PgefObject._properties.copy()
     _refs = {'_assembly'  : 'Document',

Index: PanGalactic/pangalactic/enterprise/property.py
diff -u PanGalactic/pangalactic/enterprise/property.py:1.7 PanGalactic/pangalactic/enterprise/property.py:1.8
--- PanGalactic/pangalactic/enterprise/property.py:1.7	Sun Mar  7 01:52:41 2004
+++ PanGalactic/pangalactic/enterprise/property.py	Wed Apr 14 16:48:26 2004
@@ -1,4 +1,4 @@
-# $Id: property.py,v 1.7 2004/03/07 06:52:41 waterbug Exp $
+# $Id: property.py,v 1.8 2004/04/14 20:48:26 pbear Exp $
 
 """
 An attribute whose definition can be managed.
@@ -33,10 +33,10 @@
                        ]
     _excluded_dump = []
     _fk = {}
-    _gridmap = [ ['ID', 'self.id'],
-                 ['Context' , 'self.id_context'],
-                 ['Name' , 'self.name'],
-                 ['Definition' , 'self.long_description'] ]
+#    _gridmap = [ ['ID', 'self.id'],
+#                 ['Context' , 'self.id_context'],
+#                 ['Name' , 'self.name'],
+#                 ['Definition' , 'self.long_description'] ]
     _properties = {}
     _required = []
     _refs = {}

Index: PanGalactic/pangalactic/enterprise/workflow/wfprocess.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.24 PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.25
--- PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.24	Wed Apr  7 16:11:37 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfprocess.py	Wed Apr 14 16:48:27 2004
@@ -29,20 +29,43 @@
     that an existing WfProcess is a state of the workflow.  
     """    
 
-    _defaultgridmap = [["Name", "self.name", "string", ""]]
+#    _defaultgridmap = [["Name", "self.name", "string", ""]]
 
-    _gridmap = [["Name", "self.name", "string", ""]]
+#    _gridmap = [["Name", "self.name", "string", ""]]
 
+    _default_display_names = {"name" : "Name"}
+    _default_display_order = ["name"]
+    _default_display_types = {}
+    
     _properties = {"activity_id"      : "str",
                    "default_start_id" : "str"}
 
-    _instancegridmap = [["Workflow Data",   "self.wfdata_name",            "string", ""],
-                        ["# Steps",         "self._nstates",               "string", ""],
-                        ["Status",          "self._activity_name",         "string", ""],
-                        ["Status Date",     "self._activity_date_str",     "string", ""],
-                        ["Due Date",        "self._activity_due_date_str", "string", "colour"],
-                        ["Pending\nAction", "self._next_activity_name",    "string", ""],
-                        ["Template\nName",  "self.name",                   "string", ""]]
+    _instance_display_names = {"wfdata_name" : "Workflow Data",
+                               "_nstates" : "# Steps",
+                               "_activity_name" : "Status",
+                               "_activity_date_str" : "Status Date",
+                               "_activity_due_date_str" : "Due Date",
+                               "_next_activity_name" : "Pending\nAction",
+                               "name" : "Template\nName"}
+                     
+    _instance_display_order = ["wfdata_name",
+                               "_nstates",
+                               "_activity_name",
+                               "_activity_date_str",
+                               "_activity_due_date_str",
+                               "_next_activity_name",
+                               "name"]
+                     
+    _instance_display_types = {}
+                     
+
+#    _instancegridmap = [["Workflow Data",   "self.wfdata_name",            "string", ""],
+#                        ["# Steps",         "self._nstates",               "string", ""],
+#                        ["Status",          "self._activity_name",         "string", ""],
+#                        ["Status Date",     "self._activity_date_str",     "string", ""],
+#                        ["Due Date",        "self._activity_due_date_str", "string", "colour"],
+#                        ["Pending\nAction", "self._next_activity_name",    "string", ""],
+#                        ["Template\nName",  "self.name",                   "string", ""]]
                      
 
     def __init__(self, name, activities, transitiondict, transitions, canstartlist, defaultstart):
@@ -92,6 +115,7 @@
         self.wfdata = None
         self.wfdata_name = ""
 
+        self._display_map = self.getDisplayMap()
         for key in canstartlist:
             self.activities[key].can_start = 1
 
@@ -102,6 +126,19 @@
 #                self.activities[key] = activity
 
 
+    def getDisplayMap(self):
+        if self.wfdata == None:
+            dnames = self._default_display_names
+            dorder = self._default_display_order
+            dtypes = self._default_display_types
+        else:
+            dnames = self._instance_display_names
+            dorder = self._instance_display_order
+            dtypes = self._instance_display_types
+            
+        return [[dnames.get(x, x), x, dtypes.get(x, 'string')] for x in dorder]
+
+        
     def calcTransitions(self):
         #print "\n\nwfprocess.calctransitions"
         transitions = {}

Index: PanGalactic/pangalactic/utils/localdb.py
diff -u PanGalactic/pangalactic/utils/localdb.py:1.76 PanGalactic/pangalactic/utils/localdb.py:1.77
--- PanGalactic/pangalactic/utils/localdb.py:1.76	Wed Apr  7 16:11:38 2004
+++ PanGalactic/pangalactic/utils/localdb.py	Wed Apr 14 16:48:27 2004
@@ -40,6 +40,7 @@
     
     ACUBYASSEMBLY = "ACUByAssembly"
     ACUDICT = "Acu"
+    DISPLAY_CONFIG = "DisplayConfig"
     DOCPTREL = "DocPtRel"
     DOCUMENT = "Document"
     MODEL = "Model"
@@ -68,7 +69,8 @@
     # third field  - who sees the dict displayed in the dbbrowser?
 
     dictlist = [(ACUBYASSEMBLY, 1, god),
-                (ACUDICT, 1, user), 
+                (ACUDICT, 1, user),
+                (DISPLAY_CONFIG, 1, admin),
                 (DOCPTREL, 1, admin),
                 (DOCUMENT, 1, user), 
                 (MODEL, 1, user), 
@@ -210,6 +212,15 @@
             if org.id_context == context:
                 orgs[org.pgef_oid] = org
         return orgs
+
+
+    def getDisplayConfig(self):
+        return self.getDict(self.DISPLAY_CONFIG)
+
+
+    def setDisplayConfig(self, config):
+        self.dbroot[self.DISPLAY_CONFIG] = config
+        self.Commit()
 
 
     def getLookupObject(self, pgef_oid):

Index: PanGalactic/pangalactic/enterprise/pgefobject.py
diff -u PanGalactic/pangalactic/enterprise/pgefobject.py:1.49 PanGalactic/pangalactic/enterprise/pgefobject.py:1.50
--- PanGalactic/pangalactic/enterprise/pgefobject.py:1.49	Mon Mar 22 14:36:17 2004
+++ PanGalactic/pangalactic/enterprise/pgefobject.py	Wed Apr 14 16:48:26 2004
@@ -1,9 +1,9 @@
-# $Id: pgefobject.py,v 1.49 2004/03/22 19:36:17 pbear Exp $
+# $Id: pgefobject.py,v 1.50 2004/04/14 20:48:26 pbear Exp $
 
 """
 The Mother of all PGEF Enterprise Classes.
 
-@version: $Revision: 1.49 $
+@version: $Revision: 1.50 $
 """
 
 # TODO:
@@ -23,7 +23,7 @@
 #             - checks for required fields
 #               
 
-__version__ = "$Revision: 1.49 $"[11:-2]
+__version__ = "$Revision: 1.50 $"[11:-2]
 
 import types
 import string
@@ -33,6 +33,8 @@
 from pangalactic.utils import oid
 from pangalactic.utils import datetimes
 from pangalactic.utils import pgefexceptions
+from pangalactic.utils.utils import compareSequence1
+
 
 class PgefObject(object, pb.Cacheable, pb.RemoteCache):
     """
@@ -87,14 +89,14 @@
     @type _fk:  dictionary
     @cvar _fk:  each attribute in _refs mapped to its foreign key
 
-    @type _gridmap:  list of lists
-    @cvar _gridmap:  defines which attributes are to be displayed
-                    when the object is presented in a grid, in
-                    what order, with what display names, and what
-                    column types.  The following shows the
-                    general format for a standard object:
-
-                       - C{_gridmap = [ [display_name, attr_name, type], ...]}
+#    @type _gridmap:  list of lists
+#    @cvar _gridmap:  defines which attributes are to be displayed
+#                    when the object is presented in a grid, in
+#                    what order, with what display names, and what
+#                    column types.  The following shows the
+#                    general format for a standard object:
+#
+#                       - C{_gridmap = [ [display_name, attr_name, type], ...]}
 
     @type _properties:  dictionary
     @cvar _properties:  the names and types of all attributes
@@ -128,9 +130,12 @@
                     relationship tables and foreign key
                     constraint names)
     """
+    _display_order = []
+    _display_names = {}
     _default_display_order = []
     _default_display_names = {}
     _default_display_types = {}
+
     # pgef_oid, create_datetime, and mod_datetime are excluded
     # fields because they receive non-null default values at
     # initialization time.
@@ -141,7 +146,7 @@
                        ]
     _excluded_dump = []
     _fk = {}
-    _gridmap = []
+#    _gridmap = []
     _properties = {}
     _required = []
     _refs = {}
@@ -230,20 +235,43 @@
             self.create_datetime = DateTime.now()
             self.mod_datetime = DateTime.now()
         self.onto_class = self.__class__.__name__
+        self._display_map = []
+        
 
-    def getGridMap(self, order=None, names=None, types=None):
+    def getDisplayMap(self, dorder = None, dnames = None, dtypes = None):
         """
         Generate a grid map from the combination of a
         display_order list, a display_names mapping, and a
         display_types mapping.
         """
-        if not order:
-            order = self._default_display_order
-        if not names:
-            names = self._default_display_names
-        if not types:
-            types = self._default_display_types
-        return [ [names.get(x, x), x, types.get(x, 'string')] for x in order ]
+        #print "pgefobject.getdisplaymap"
+        attr_names = self.__dict__.keys()
+        labels = [(attr_name, attr_name.replace("_", " ").title().strip()) for attr_name in attr_names]
+        if not self._default_display_names:
+            self._default_display_names = dict(labels)
+
+        if not self._default_display_order:
+            labels.sort(compareSequence1)
+            self._default_display_order = [label[0] for label in labels]
+#            print "order", self._default_display_order
+            
+        if not self._default_display_types:
+            attr_types = [(attr_name, "string") for attr_name in attr_names]
+            self._default_display_types = dict(attr_types)
+            for attr_name, attr_type in attr_types:
+                obj = self.__dict__[attr_name]
+                if isinstance(obj, PgefObject):
+                    self._default_display_types[attr_name] = obj.pgef_class
+            #print "types", self._default_display_types
+
+        if not dnames:
+            dnames = self._default_display_names
+        if not dorder:
+            dorder = self._default_display_order
+        if not dtypes:
+            dtypes = self._default_display_types
+        return [[dnames.get(x, x), x, dtypes.get(x, 'string')] for x in dorder]
+
 
     def set_string_date(self):
         raise TypeError, 'Attribute cannot be set'
@@ -450,40 +478,62 @@
         @param FilterForDump: if true, datamembers in
                               _excluded_dump are excluded
         """
-        #print "convertdatatolist"
+        print "convertdatatolist"
         datalist = []
-        #print "self.gridmap", self.gridmap
         #print "self.excludeddump", self.ExcludedDump
-        for data in self._gridmap:
+        for data in self._default_display_order:
             if FilterForDump:
-                if data[0] in self._excluded_dump:
+                if data in self._excluded_dump:
                     continue
-            #datalist.append(data[1])  # old way
-            
-            #print "appending", data[1]
-            if len(data[1]) == 0:
-                # this should take care of the mark and drag
-                # columns in the grid
-                datalist.append("")
-            else:
-                try:
-                    #foo = eval(data[1])
-                    #print foo
-                    tmpname = data[1].replace("self.", "")
-                    tmp = getattr(self, tmpname)
-                    if callable(tmp):
-                        datalist.append(tmp())
-                    else:
-                        datalist.append(eval(data[1]))
-
-                except Exception:
-                    print "error in eval of", data[1]
-                    import traceback
-                    traceback.print_exc()
-#                    datalist.append("")
-            #print "appended", data[1]
+
+            try:
+                tmp = getattr(self, data)
+                if callable(tmp):
+                    datalist.append(tmp())
+                else:
+                    datalist.append(eval(data))
+
+            except Exception:
+                print "error in eval of", data
+                import traceback
+                traceback.print_exc()
         return datalist
 
+# old way        
+##        datalist = []
+##        #print "self.gridmap", self.gridmap
+##        #print "self.excludeddump", self.ExcludedDump
+##        for data in self._gridmap:
+##            if FilterForDump:
+##                if data[0] in self._excluded_dump:
+##                    continue
+##            #datalist.append(data[1])  # old way
+            
+##            #print "appending", data[1]
+##            if len(data[1]) == 0:
+##                # this should take care of the mark and drag
+##                # columns in the grid
+##                datalist.append("")
+##            else:
+##                try:
+##                    #foo = eval(data[1])
+##                    #print foo
+##                    tmpname = data[1].replace("self.", "")
+##                    tmp = getattr(self, tmpname)
+##                    if callable(tmp):
+##                        datalist.append(tmp())
+##                    else:
+##                        datalist.append(eval(data[1]))
+
+##                except Exception:
+##                    print "error in eval of", data[1]
+##                    import traceback
+##                    traceback.print_exc()
+###                    datalist.append("")
+##            #print "appended", data[1]
+##        return datalist
+
+#old old way
 ##        tmp = []
 ##        print "datalist", datalist
 ##        for dataitem in datalist:
@@ -511,14 +561,22 @@
         @param FilterForDump: if true, datamembers in
                               _excluded_dump are excluded
         """
-        #return [heading[0] for heading in self.gridmap]
         datanames = []
-        for heading in self._gridmap:
+        for heading in self._default_display_order:
             if FilterForDump:
-                if heading[0] in self._excluded_dump:
+                if heading in self._excluded_dump:
                     continue
-            datanames.append(heading[0])
+            datanames.append(heading)
         return datanames
+
+#old way        
+##        #return [heading[0] for heading in self.gridmap]
+##        for heading in self._gridmap:
+##            if FilterForDump:
+##                if heading[0] in self._excluded_dump:
+##                    continue
+##            datanames.append(heading[0])
+##        return datanames
     
     def DataNames(self):
         """

Index: PanGalactic/pangalactic/utils/utils.py
diff -u PanGalactic/pangalactic/utils/utils.py:1.5 PanGalactic/pangalactic/utils/utils.py:1.6
--- PanGalactic/pangalactic/utils/utils.py:1.5	Sun Mar  7 01:52:42 2004
+++ PanGalactic/pangalactic/utils/utils.py	Wed Apr 14 16:48:27 2004
@@ -2,13 +2,23 @@
 PGEF utility programs
 """
 
-# $Id: utils.py,v 1.5 2004/03/07 06:52:42 waterbug Exp $
+# $Id: utils.py,v 1.6 2004/04/14 20:48:27 pbear Exp $
 
 from __future__ import generators
 import sys, string
 from twisted.internet import reactor
 from twisted.internet import utils as iutils
 
+
+def compareSequence1(left, right):
+    if left[1] > right[1]:
+        return 1
+    elif left[1] < right[1]:
+        return -1
+    else:
+        return 0
+        
+        
 
 def paragraphs(thang, separator='\n'):
     """

Index: PanGalactic/pangalactic/utils/dbbrowser_wdr.py
diff -u PanGalactic/pangalactic/utils/dbbrowser_wdr.py:1.3 PanGalactic/pangalactic/utils/dbbrowser_wdr.py:1.4
--- PanGalactic/pangalactic/utils/dbbrowser_wdr.py:1.3	Fri Mar  5 16:18:15 2004
+++ PanGalactic/pangalactic/utils/dbbrowser_wdr.py	Wed Apr 14 16:48:27 2004
@@ -1,10 +1,13 @@
 #-----------------------------------------------------------------------------
-# Python source Generated by wxDesigner from file: dbbrowser.wdr
+# Python source generated by wxDesigner from file: dbbrowser.wdr
 # Do not modify this file, all changes will be lost!
 #-----------------------------------------------------------------------------
 
+# -*- coding: iso-8859-1 -*-
+
 # Include wxWindows' modules
 from wxPython.wx import *
+from wxPython.grid import *
 
 # Custom source
 from wxPython.grid import *
@@ -13,58 +16,54 @@
 
 ID_TEXT = wxNewId()
 ID_ROOTITEMS = wxNewId()
-ID_BUTTON_CONFIG = wxNewId()
-ID_LINE = wxNewId()
 ID_GRID = wxNewId()
+ID_BUTTON_CONFIG = wxNewId()
 ID_REFRESHDB = wxNewId()
 ID_CLOSE = 5100
 
-def ZODBBrowserFunc( parent, call_fit = true, set_sizer = true ):
+def ZODBBrowserFunc( parent, call_fit = True, set_sizer = True ):
     item0 = wxBoxSizer( wxVERTICAL )
     
     item1 = wxBoxSizer( wxHORIZONTAL )
     
     item2 = wxBoxSizer( wxVERTICAL )
     
-    item3 = wxStaticText( parent, ID_TEXT, "Root items:", wxDefaultPosition, wxDefaultSize, 0 )
+    item3 = wxStaticText( parent, ID_TEXT, "Collections", wxDefaultPosition, wxDefaultSize, 0 )
     item2.AddWindow( item3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
 
     item4 = wxListBox( parent, ID_ROOTITEMS, wxDefaultPosition, wxSize(80,100), [], wxLB_SINGLE )
-    item2.AddWindow( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item2.AddWindow( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 )
 
-    item1.AddSizer( item2, 2, wxALIGN_CENTRE|wxALL, 5 )
+    item1.AddSizer( item2, 2, wxALIGN_CENTER|wxALL, 5 )
 
-    item5 = wxButton( parent, ID_BUTTON_CONFIG, "Customize...", wxDefaultPosition, wxDefaultSize, 0 )
-    item1.AddWindow( item5, 0, wxALIGN_CENTRE|wxALL, 5 )
+    item0.AddSizer( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 )
 
-    item0.AddSizer( item1, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item5 = wxStaticText( parent, ID_TEXT, "Contents", wxDefaultPosition, wxDefaultSize, 0 )
+    item0.AddWindow( item5, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
 
-    item6 = wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL )
-    item0.AddWindow( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item6 = wxGrid( parent, ID_GRID, wxDefaultPosition, wxSize(200,160), wxWANTS_CHARS )
+    item6.CreateGrid( 10, 11, wxGrid.wxGridSelectCells )
+    item0.AddWindow( item6, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
 
-    item7 = wxStaticText( parent, ID_TEXT, "Contents:", wxDefaultPosition, wxDefaultSize, 0 )
-    item0.AddWindow( item7, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
+    item7 = wxBoxSizer( wxHORIZONTAL )
+    
+    item8 = wxButton( parent, ID_BUTTON_CONFIG, "Customize...", wxDefaultPosition, wxDefaultSize, 0 )
+    item7.AddWindow( item8, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 )
 
-    item8 = wxGrid( parent, ID_GRID, wxDefaultPosition, wxSize(200,160), wxWANTS_CHARS )
-    item8.CreateGrid( 10, 11 )
-    item0.AddWindow( item8, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
+    item9 = wxButton( parent, ID_REFRESHDB, "&Refresh", wxDefaultPosition, wxDefaultSize, 0 )
+    item9.SetDefault()
+    item7.AddWindow( item9, 0, wxALIGN_CENTER|wxALL, 5 )
 
-    item9 = wxBoxSizer( wxHORIZONTAL )
-    
-    item10 = wxButton( parent, ID_REFRESHDB, "&Refresh", wxDefaultPosition, wxDefaultSize, 0 )
+    item10 = wxButton( parent, ID_CLOSE, "&Close", wxDefaultPosition, wxDefaultSize, 0 )
     item10.SetDefault()
-    item9.AddWindow( item10, 0, wxALIGN_CENTRE|wxALL, 5 )
-
-    item11 = wxButton( parent, ID_CLOSE, "&Close", wxDefaultPosition, wxDefaultSize, 0 )
-    item11.SetDefault()
-    item9.AddWindow( item11, 0, wxALIGN_CENTRE|wxALL, 5 )
+    item7.AddWindow( item10, 0, wxALIGN_CENTER|wxALL, 5 )
 
-    item0.AddSizer( item9, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item0.AddSizer( item7, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    if set_sizer == true:
-        parent.SetAutoLayout( true )
+    if set_sizer == True:
+        parent.SetAutoLayout( True )
         parent.SetSizer( item0 )
-        if call_fit == true:
+        if call_fit == True:
             item0.Fit( parent )
             item0.SetSizeHints( parent )
     
@@ -79,4 +78,4 @@
 def BrowserImagesFunc( index ):
     return wxNullBitmap
 
-# End of Generated file
+# End of generated file

Index: PanGalactic/pangalactic/utils/configuregrid.py
diff -u PanGalactic/pangalactic/utils/configuregrid.py:1.3 PanGalactic/pangalactic/utils/configuregrid.py:1.4
--- PanGalactic/pangalactic/utils/configuregrid.py:1.3	Fri Mar  5 16:18:15 2004
+++ PanGalactic/pangalactic/utils/configuregrid.py	Wed Apr 14 16:48:27 2004
@@ -1,105 +1,147 @@
 #!/bin/env python
 #----------------------------------------------------------------------------
-# Name:         configdbbrowser.py
-# Author:       XXXX
-# Created:      XX/XX/XX
+# Name:         configuregrid.py
+# Author:       
+# Created:      
 # Copyright:    
 #----------------------------------------------------------------------------
 
 from wxPython.wx import *
 from wxPython.lib.mixins.listctrl import wxColumnSorterMixin
 from pangalactic.utils.configuredisplay import ConfigureDisplay
+from pangalactic.utils.localdb import *
+
 
 class ConfigureGrid(ConfigureDisplay, wxColumnSorterMixin):
     def __init__(self, parent, id,
                  pos = wxPyDefaultPosition,
                  size = wxPyDefaultSize,
                  style = wxTAB_TRAVERSAL,
-                 disp_objs = None,
-                 old_mapping = None):
-
+                 localdb = None,
+                 collection_name = None,
+                 current_config = None):
+        
         ConfigureDisplay.__init__(self, parent, id, pos, size, style)
-        self.displayed_objects = disp_objs
+        self.collection_name = collection_name
+        self.localDB = localdb
 
-        self.attr_list = self.CreateAttributeList()
-        self.current_config = []
-        if old_mapping:
-            self.current_config = old_mapping
+        if current_config:
+            self.current_config = current_config
+        else:
+            self.current_config = self.localDB.getDisplayConfig()
         self.Setup()
+        
+        EVT_BUTTON(self, wxID_CANCEL, self.OnCancel)
 
+    
     def Setup(self):
-        #print "cust.setup"
+        #print "configgrid.setup"
         self.attr_list = self.CreateAttributeList()
-        self.GetListctrlAvailable().ClearAll()
-        self.GetListctrlAvailable().InsertColumn(0, "Attribute Names")
-        self.GetListctrlAvailable().SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER)
-        
-        self.GetListctrlShown().ClearAll()
-        self.GetListctrlShown().InsertColumn(0, "Displayed Attributes")
-        self.GetListctrlShown().SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER)
+        wgt = self.GetAvailableWgt()
+        wgt.ClearAll()
+        wgt.InsertColumn(0, "Attribute Names")
+        wgt.SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER)
+
+        wgt = self.GetShownWgt()
+        wgt.ClearAll()
+        wgt.InsertColumn(0, "Attributes Shown")
+        wgt.SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER)
 
         rows = self.grid.GetNumberRows()
         if rows:
             self.grid.DeleteRows(0, rows)
         self.grid.SetColLabelValue(0, 'Attribute Name')
-        self.grid.SetColLabelValue(1, 'Display Name')
-        self.grid.SetColSize(0,200)
-        self.grid.SetColSize(1,200)
+        self.grid.SetColLabelValue(1, 'Column Name')
+        self.grid.SetColSize(0, 200)
+        self.grid.SetColSize(1, 200)
+
         if self.attr_list:
             self.FillAvailable()
         if self.current_config:
             self.ReloadSelections()
-        self.grid.MakeCellVisible(0,0)
-        
+        self.grid.MakeCellVisible(0, 0)
+
             
     def CreateAttributeList(self):
-        """Creates the list of all available attribute names in the entire displayed objects list"""
-        #print "cust.createattributelist"
+        """Creates the list of all available attribute names in the entire collection"""
+        print "configgrid.createattributelist", self.collection_name
         temp = {}
-        for obj in self.displayed_objects:
-            for attr in obj.__dict__.keys():
-                if attr.startswith('_'):
-                    pass
-                else:
-                    temp[attr] = ''
+        collection = self.localDB.getDict(self.collection_name)
+        for obj_id, obj in collection.items():
+            if isinstance(obj, types.StringType):
+                temp["id"] = ""
+                temp["value"] = ""
+
+            elif hasattr(obj, "__dict__"):
+                for attr in obj.__dict__.keys():
+                    temp[attr] = ""
+                    
+            else:
+                return []
         return temp.keys()
+
             
     def ReloadSelections(self):
         """Reloads the shown listctrl with the previous selections and also updates the grid"""
-        #print "cust.reloadselections"
+        #print "configgrid.reloadselections"
 
-        #print "current_config", self.current_config
-        
-        ##Get the list of tuples that are attr name and display name
-        if self.current_config:
+        # Get the list of tuples that are attr name and display name
+        if self.current_config.has_key(self.collection_name):
+            selections = self.current_config[self.collection_name]
+    
             #loop through the list and set the item as selected in the available listctrl
-            for attrname, dispname in self.current_config:
-                #print "attrname, dispname (%s, %s)" % (attrname, dispname)
-                ndx = self.GetListctrlAvailable().FindItem(-1, attrname)
-#                if ndx >= 0:
-                self.GetListctrlAvailable().SetItemState (ndx, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
+            availwgt = self.GetAvailableWgt()
+            shownwgt = self.GetShownWgt()
+            for attrname, dispname in selections:
+                ndx = availwgt.FindItem(-1, attrname)
+                availwgt.SetItemState (ndx, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
 
                 #move all the selected entries to the shown listctrl
-                self.MoveSelections(self.GetListctrlAvailable(), self.GetListctrlShown())
+                self.MoveSelections(availwgt, shownwgt)
 
             #once again loop the list and put the display name into the grid
-            for attrname, dispname in self.current_config:
-                ndx = self.GetListctrlShown().FindItem(-1, attrname)
-#                if ndx >= 0:
+            for attrname, dispname in selections:
+                ndx = shownwgt.FindItem(-1, attrname)
                 self.grid.SetCellValue(ndx, 1, dispname)
+        
             
+    def SaveConfig(self):
+        #print "saveconfig"
+        disp_list = self.GetDisplayList()
+        self.current_config[self.collection_name] = disp_list
+        self.localDB.setDisplayConfig(self.current_config)
+
+            
+##    def ReadConfig(self):
+##        #print "configgrid.readconfig"
+##        try:
+##            #print "current_config"
+##            self.current_config = self.localDB.getDisplayConfig()
+##            #print self.current_config
+##        except:
+##            #print "======> exception"
+##            self.current_config = {}
     
     def GetDisplayList(self):
-        #print "cust.getdisplaylist"
+        #print "configgrid.getdisplaylist"
         numrows = self.grid.GetNumberRows()
         temp = []
-        for x in range(numrows):
-            cell_zero = self.grid.GetCellValue(x, 0)
-            cell_one = self.grid.GetCellValue(x, 1)
-            temp.append((cell_zero, cell_one))
-            
+        for row in range(numrows):
+            attr_name = self.grid.GetCellValue(row, 0)
+            col_label = self.grid.GetCellValue(row, 1)
+            temp.append((attr_name, col_label))
+
         if len(temp) == 0:
             temp = None
+            
         return temp
+        
     
-    
+    def OnCancel(self, event):
+        self.Parent.Close()
+
+    def OnOK(self, event):
+        print "configuregrid.ok"
+        self.SaveConfig()
+        self.Parent.Close()
+        

Index: PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py:1.9 PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py:1.10
--- PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py:1.9	Fri Mar  5 16:18:13 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py	Wed Apr 14 16:48:27 2004
@@ -30,57 +30,60 @@
         PgefDataTable.__init__(self)
         # self.identifiers = []      ## list of data object attribute names, 1 per column, in order from left to right
         # self._data = []            ## list of data objects, 1 per row
-        # self.display_mapping = []  ## list of tuples : (attribute name, column label), 1 per column
+        # self.display_map = []      ## list of tuples : (attribute name, column label), 1 per column
         self._datadict = {}
-        self._UseDefaultMapping = false
+#        self._UseDefaultMapping = false
 
 
-    def SetDefaultMapping(self):
-        if self._data:
-            self.identifiers = [z[1].replace('self.','') for z in self._data[0]._defaultgridmap]
-            self.display_mapping = [(z[1].replace('self.',''), z[0]) for z in self._data[0]._defaultgridmap]
-            self._UseDefaultMapping = true
+##    def SetDefaultMapping(self):
+##        print "wfdatatable.setdefaultmapping"
+##        if self._data:
+##            #self.identifiers = [z[1].replace('self.','') for z in self._data[0]._defaultgridmap]
+##            #self.display_map = [(z[1].replace('self.',''), z[0]) for z in self._data[0]._defaultgridmap]
+##            self.identifiers = self._data[0]._default_display_order
+##            self.display_map = self._data[0]._default_display_names
+##            self._UseDefaultMapping = true
 
-            
+             
     def GetDisplayMapping(self):
-        return self.display_mapping
+        return self.display_map
 
-    def IsEmptyCell(self, row, col):
-        retval = None
-        tmpid = self.identifiers[col]
-        tmp = getattr(self._data[row], tmpid)
-        if callable(tmp):
-            retval = tmp()
-        else:
-            if tmpid.find(".") <> -1:
-                attrs = tmpid.split(".")
-                for attr in attrs:
-                    retval = self._data[row].__dict__[attr]
-            else:
-                retval = self._data[row].__dict__[tmpid]
+##    def IsEmptyCell(self, row, col):
+##        retval = None
+##        tmpid = self.identifiers[col]
+##        tmp = getattr(self._data[row], tmpid)
+##        if callable(tmp):
+##            retval = tmp()
+##        else:
+##            if tmpid.find(".") <> -1:
+##                attrs = tmpid.split(".")
+##                for attr in attrs:
+##                    retval = self._data[row].__dict__[attr]
+##            else:
+##                retval = self._data[row].__dict__[tmpid]
 
-        return not retval
+##        return not retval
         
 
-    def GetValue(self, row, col):
-        retval = None
-#        print "getvalues.identifiers", self.identifiers
-        tmpid = self.identifiers[col]
-#        print "getvalue", row, col, tmpid
-#        print "getvalue.tmpid", tmpid
-#        print "data[row]", self._data[row]
-        tmp = getattr(self._data[row], tmpid)
-        if callable(tmp):
-            retval = tmp()
-        else:
-            if tmpid.find(".") <> -1:
-                attrs = tmpid.split(".")
-                for attr in attrs:
-                    retval = self._data[row].__dict__[attr]
-            else:
-                retval = self._data[row].__dict__[tmpid]
+##    def GetValue(self, row, col):
+##        retval = None
+###        print "getvalues.identifiers", self.identifiers
+##        tmpid = self.identifiers[col]
+###        print "getvalue", row, col, tmpid
+###        print "getvalue.tmpid", tmpid
+###        print "data[row]", self._data[row]
+##        tmp = getattr(self._data[row], tmpid)
+##        if callable(tmp):
+##            retval = tmp()
+##        else:
+##            if tmpid.find(".") <> -1:
+##                attrs = tmpid.split(".")
+##                for attr in attrs:
+##                    retval = self._data[row].__dict__[attr]
+##            else:
+##                retval = self._data[row].__dict__[tmpid]
 
-        return retval
+##        return retval
 
 
     def SetValue(self, row, col, value):
@@ -88,86 +91,141 @@
 
 
     def GetColLabelValue(self, col):
-        retval = None
+        # Called when the grid needs to display column labels
         if self._data:
-            if self.display_mapping:
-                retval = self.display_mapping[col][1]
-                if retval == "":
-                    retval = self.display_mapping[col][0]
-                elif retval == None:
-                    retval = " "
+#            if self.display_map:
+#                return self.display_map[col][1]
+            #    retval = self.display_map[col][1]
+            #    if retval == "":
+            #        retval = self.display_map[col][0]
+            #    elif retval == None:
+            #        retval = " "
+            #else:
+            #    retval = self.identifiers[col]
+            #    if retval == None:
+            #        retval = " "
+            #return retval
+            if self._data[0].wfdata:
+                return self._data[0]._instance_display_names[self._data[0]._instance_display_order[col]]
             else:
-                retval = self.identifiers[col]
-                if retval == None:
-                    retval = " "
-            return retval
-
-    def setGridMap(self, gridmap):
-        #print "wfdatatable.setgridmap"
-        self.identifiers = [z[1].replace("self.", "") for z in gridmap]
-        self.display_mapping = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
-#        print "wftable.display_mapping", self.display_mapping
-        
+                return self._data[0]._default_display_names[self._data[0]._default_display_order[col]]
+        return "N/A"
 
-    def SetDisplayMapping(self, mapping):
-        #print "wfdatatable.setdisplaymapping", mapping
-        if mapping:
-            self.display_mapping = mapping
-            self.identifiers = [entry[0] for entry in self.display_mapping]
-
-        elif self._data:
-            if self._UseDefaultMapping:
-                gridmap = self._data[0]._defaultgridmap
-            else:
-                gridmap = self._data[0]._gridmap
-            self.identifiers = [z[1].replace("self.", "") for z in gridmap]
-            self.display_mapping = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
 
+##    def GetColLabelValue(self, col):
+##        retval = None
+##        if self._data:
+##            if self.display_map:
+##                retval = self.display_map[col][1]
+##                if retval == "":
+##                    retval = self.display_map[col][0]
+##                elif retval == None:
+##                    retval = " "
+##            else:
+##                retval = self.identifiers[col]
+##                if retval == None:
+##                    retval = " "
+##            return retval
+
+#    def setDisplayMap(self):
+#        print "wfdatatable.setdisplaymap"
+#        self.identifiers = self._data[0]._default_display_order
+#        self.display_map = self._data[0]._default_display_names
+#        self.identifiers = [z[1].replace("self.", "") for z in gridmap]
+#        self.display_map = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
+#        print "wftable.display_mapping", self.display_map
+        
 
+#    def SetDisplayMapping(self, mapping):
+#        print "wfdatatable.setdisplaymapping", mapping
+#        if mapping:
+#            self.display_map = mapping
+#            self.identifiers = [entry[0] for entry in self.display_map]
+#
+#        elif self._data:
+#            self.identifiers = self._data[0]._default_display_order
+#            self.display_map = self._data[0]._default_display_names
+##            if self._UseDefaultMapping:
+##                gridmap = self._data[0]._defaultgridmap
+##            else:
+##                gridmap = self._data[0]._gridmap
+##            self.identifiers = [z[1].replace("self.", "") for z in gridmap]
+##            self.display_map = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
+
+            
+##    def AddData(self, new_obj):
+##        if isinstance(new_obj, ListType):
+##            num_rows = len(new_obj)
+##            if num_rows == 0:
+##                return
+            
+##            for obj in new_obj:
+##                self._data.append(obj)
+##                self._datadict[obj.pgef_oid] = len(self._data) - 1
+##        else:
+##            num_rows = 1
+##            self._data.append(new_obj)
+##            self._datadict[new_obj.pgef_oid] = len(self._data) - 1
+
+##        if self._UseDefaultMapping:
+##            self.identifiers = self._data[0]._default_display_order
+##            self.display_map = self._data[0]._default_display_names
+###            gridmap = self._data[0]._defaultgridmap
+###            self.display_map = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
+###            self.identifiers = [entry[0] for entry in self.display_map]
+##            msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_APPENDED, len(self.identifiers))
+##            self.GetView().ProcessTableMessage(msg)
+
+##        else:
+##            if not self.display_map:
+##                self.display_map = self._data[0]._default_display_names
+###                gridmap = self._data[0]._gridmap
+###                self.display_map = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
+
+##            if not self.identifiers:
+##                self.identifiers = [entry[0] for entry in self.display_map]
+
+##                msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_APPENDED, len(self.identifiers))
+##                self.GetView().ProcessTableMessage(msg)
+
+##        #print "adddata.mapping", self.display_map
+##        msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, num_rows)
+##        self.GetView().ProcessTableMessage(msg)
+##        msg = wxGridTableMessage(self, wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)
+##        self.GetView().ProcessTableMessage(msg)
             
+
     def AddData(self, new_obj):
         if isinstance(new_obj, ListType):
             num_rows = len(new_obj)
-            if num_rows == 0:
-                return
-            
             for obj in new_obj:
                 self._data.append(obj)
-                self._datadict[obj.pgef_oid] = len(self._data) - 1
         else:
             num_rows = 1
             self._data.append(new_obj)
-            self._datadict[new_obj.pgef_oid] = len(self._data) - 1
 
-        if self._UseDefaultMapping:
-            gridmap = self._data[0]._defaultgridmap
-            self.display_mapping = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
-            self.identifiers = [entry[0] for entry in self.display_mapping]
+        if not self.identifiers:
+            if self._data[0].wfdata:
+                self.identifiers = self._data[0]._instance_display_order
+            else:
+                self.identifiers = self._data[0]._default_display_order
             msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_APPENDED, len(self.identifiers))
             self.GetView().ProcessTableMessage(msg)
 
-        else:
-            if not self.display_mapping:
-                gridmap = self._data[0]._gridmap
-                self.display_mapping = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
-
-            if not self.identifiers:
-                self.identifiers = [entry[0] for entry in self.display_mapping]
-
-                msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_APPENDED, len(self.identifiers))
-                self.GetView().ProcessTableMessage(msg)
+        if not self.display_map:                
+            if self._data[0].wfdata:
+                self.display_map = self._data[0]._instance_display_names
+            else:
+                self.display_map = self._data[0]._default_display_names
 
-        #print "adddata.mapping", self.display_mapping
         msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, num_rows)
         self.GetView().ProcessTableMessage(msg)
         msg = wxGridTableMessage(self, wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)
         self.GetView().ProcessTableMessage(msg)
-            
-            
+
             
     def UpdateData(self, newobj):
         #print "wfdatatable.updatedata"
-
         if self._datadict.has_key(newobj.pgef_oid):
             ndx = self._datadict[newobj.pgef_oid]
         
@@ -186,5 +244,5 @@
             self.GetView().ProcessTableMessage(msg)
             
             
-    def AppendRows(self, numrows):
-        print "wfdatatable.appendrows"
+#    def AppendRows(self, numrows):
+#        print "wfdatatable.appendrows"

Index: PanGalactic/pangalactic/utils/pgefdatatable.py
diff -u PanGalactic/pangalactic/utils/pgefdatatable.py:1.7 PanGalactic/pangalactic/utils/pgefdatatable.py:1.8
--- PanGalactic/pangalactic/utils/pgefdatatable.py:1.7	Fri Mar  5 16:18:16 2004
+++ PanGalactic/pangalactic/utils/pgefdatatable.py	Wed Apr 14 16:48:27 2004
@@ -1,6 +1,7 @@
+from types import ListType
+
 from wxPython.wx import *
 from wxPython.grid import *
-from types import ListType
 
 #---------------------------------------------------------------------------
 
@@ -13,61 +14,41 @@
 
         # identifiers      ## list of data object attribute names, 1 per column, in order from left to right
         # _data            ## list of data objects, 1 per row
-        # display_mapping  ## list of tuples : (attribute name, column label), 1 per column
+        # display_map      ## list of tuples : (attribute name, column label), 1 per column
 
         self.identifiers = []
         self._data = []
-        self.display_mapping = []
+        self.display_map = []
+
 
     #--------------------------------------------------
     # required methods for the wxPyGridTableBase interface
 
-    def GetDisplayMapping(self):
-        #print "pgefdatatable.getdisplaymapping"
-        #print self.display_mapping
-        return self.display_mapping
-
     def GetNumberRows(self):
         return len(self._data)
 
     def GetNumberCols(self):
-        #print 'number of cols: %i' % len(self.identifiers)
         return len(self.identifiers)
 
     def IsEmptyCell(self, row, col):
-        id = self.identifiers[col]
-        #print "isemptycell", row, col, id
-        if id.find('.') != -1:
-            #print 'found a period'
-            attrs = id.split('.')
-            #print 'attr list is: <%s>' % attrs
-            for attr in attrs:
-                retval = getattr(self._data[row], attr)#.__dict__[attr]
+        cid = self.identifiers[col]
+        if cid.find(".") != -1:
+            attrs = cid.split(".")
+#            for attr in attrs:
+            retval = getattr(self._data[row], attrs[1])
         else:
-            retval = getattr(self._data[row], id)#.__dict__[id]
+            retval = getattr(self._data[row], cid)
         return not retval
         
 
     def GetValue(self, row, col):
         oid = self.identifiers[col]
-        #print self.identifiers
-        #print col
-        #print 'oid is: %s' % repr(oid)
-        if oid.find('.') != -1:
-            #print "pgefdatatable.getvalue"
-            #print "referenced"
-            #print "for", oid, "at", row, col
-            #print 'found a period'
-            attrs = oid.split('.')
-            #print 'attr list is: <%s>' % attrs
-            for attr in attrs:
-                retval = getattr(self._data[row], attr)#.__dict__[attr]
+        if oid.find(".") != -1:
+            attrs = oid.split(".")
+#            for attr in attrs:
+            retval = getattr(self._data[row], attrs[1])
         else:
-            #print "direct"
-            #print "getvalue for", oid, "at", row, col
-            #print self._data[row].__class__.__name__
-            #print self._data[row].__dict__.items()
-            retval = getattr(self._data[row], oid)#.__dict__[oid]
+            retval = getattr(self._data[row], oid)
         return retval
     
 
@@ -75,55 +56,57 @@
         oid = self.identifiers[col]
         self._data[row].__dict__[oid[0]] = value
 
-    #--------------------------------------------------
-    # Some optional methods
 
-    # Called when the grid needs to display column labels
     def GetColLabelValue(self, col):
+        # Called when the grid needs to display column labels
         if self._data:
-            if self.display_mapping:
-                #print self.display_mapping
-                retval = self.display_mapping[col][1]
-                if retval == '':
-                    retval = self.display_mapping[col][0]
-                elif retval == None:
-                    retval = ' '
-            else:
-                retval = self.identifiers[col]
-                if retval == None:
-                    retval = ' '
-            return retval #.replace('&','\n')
-
-    #--------------------------------------------------
-    # Methods added for demo purposes.
+#            if self.display_map:
+#                return self.display_map[col][1]
+            #    retval = self.display_map[col][1]
+            #    if retval == "":
+            #        retval = self.display_map[col][0]
+            #    elif retval == None:
+            #        retval = " "
+            #else:
+            #    retval = self.identifiers[col]
+            #    if retval == None:
+            #        retval = " "
+            #return retval
+            return self._data[0]._default_display_names[self._data[0]._default_display_order[col]]
+        return "N/A"
 
-    # The physical moving of the cols/rows is left to the implementer.
-    # Because of the dynamic nature of a wxGrid the physical moving of
-    # columns differs from implementation to implementation
 
-    # Move the column
     def MoveColumn(self, frm, to):
-        #print 'from: %i\tto: %i' % (frm, to)
         grid = self.GetView()
         if grid:
             # Move the identifiers
             old = self.identifiers[frm]
             del self.identifiers[frm]
 
-            old_mapping = self.display_mapping[frm]
-            del self.display_mapping[frm]
+            old_mapping = self.display_map[frm]
+            del self.display_map[frm]
 
             if to > frm:
                 insertpoint = to - 1
                 self.identifiers.insert(insertpoint, old)
-                self.display_mapping.insert(insertpoint, old_mapping)
+                self.display_map.insert(insertpoint, old_mapping)
             else:
                 insertpoint = to
                 self.identifiers.insert(insertpoint, old)
-                self.display_mapping.insert(insertpoint, old_mapping)
+                self.display_map.insert(insertpoint, old_mapping)
+
+##            old_mapping = self.display_map[frm]
+##            del self.display_map[frm]
+
+##            if to > frm:
+##                insertpoint = to - 1
+##                self.identifiers.insert(insertpoint, old)
+##                self.display_map.insert(insertpoint, old_mapping)
+##            else:
+##                insertpoint = to
+##                self.identifiers.insert(insertpoint, old)
+##                self.display_map.insert(insertpoint, old_mapping)
 
-            #print self.display_mapping
-                
             # Notify the grid
             grid.BeginBatch()
             msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_DELETED, frm, 1)
@@ -136,7 +119,6 @@
     #--------------------------------------------------
     # Methods added for pgef purposes.
 
-
     def getObjectByOid(self, oid):
         for ndx in range(len(self._data)):
             obj = self._data[ndx]
@@ -157,27 +139,18 @@
             return None
         
 
-    def SetDisplayMapping(self, mapping):
-        #print "pgefdatatable.setdisplaymapping"
-        if mapping:
-            self.display_mapping = mapping
-            #print "display_mapping", self.display_mapping
-            self.identifiers = [entry[0] for entry in self.display_mapping]
-            #print "mapping", mapping[0]
-            #print "identifiers", self.identifiers[0]
-            #msg = wxGridTableMessage(self, wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)
-            #self.RefreshGrid()
-            #self.GetView().ProcessTableMessage(msg)
-            #print 'identifiers are: %s' % self.identifiers
-        elif self._data:
-            #print "no mapping, table data"
-            #self.identifiers = self._data[0].__dict__.keys()
-            #self.display_mapping = zip(self.identifiers, self.identifiers)
-
-            self.identifiers = [z[1].replace('self.','') for z in self._data[0]._gridmap]
-            self.display_mapping = [(z[1].replace('self.',''), z[0]) for z in self._data[0]._gridmap]
-            #print "display_mapping", self.display_mapping
-            #print "identifiers", self.identifiers[0]
+    def setDisplayMap(self, mapping):
+        print "pgefdatatable.setdisplaymap"
+        self.identifiers = self._data[0]._default_display_order
+        self.display_map = self._data[0]._default_display_names
+#        if mapping:
+#            self.display_map = mapping
+#            self.identifiers = [entry[0] for entry in self.display_map]
+#        elif self._data:
+#            self.identifiers = self._data[0]._default_display_order
+#            self.display_map = self._data[0]._default_display_names
+##            self.identifiers = [z[1].replace("self.","") for z in self._data[0]._gridmap]
+##            self.display_map = [(z[1].replace("self.",""), z[0]) for z in self._data[0]._gridmap]
 
     def DeleteObject(self, ndx):
         if ndx:       
@@ -203,7 +176,6 @@
         msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_DELETED, 0, cols)
         self.GetView().ProcessTableMessage(msg)
         
-        #print 'there are %i identifiers' % len(self.identifiers)
         msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_APPENDED, len(self.identifiers))
         self.GetView().ProcessTableMessage(msg)
         
@@ -215,30 +187,31 @@
         msg = wxGridTableMessage(self, wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)
         self.GetView().ProcessTableMessage(msg)
         
+
     def AddData(self, new_obj):
         if isinstance(new_obj, ListType):
-            #print "adding list"
             num_rows = len(new_obj)
             for obj in new_obj:
                 self._data.append(obj)
         else:
-            #print "adding object"
             num_rows = 1
             self._data.append(new_obj)
 
         if not self.identifiers:
-            #self.identifiers = new_obj.DataNames()
-            self.identifiers = [z[1].replace('self.','') for z in new_obj._gridmap]
-
-        if not self.display_mapping:                
-            #self.display_mapping = zip(self.identifiers, self.identifiers)
-            self.display_mapping = [(z[1].replace('self.',''), z[0]) for z in new_obj._gridmap]
+            self.identifiers = self._data[0]._default_display_order
             msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_APPENDED, len(self.identifiers))
             self.GetView().ProcessTableMessage(msg)
-            
+
+        if not self.display_map:                
+            self.display_map = self._data[0]._default_display_names
+
         msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, num_rows)
         self.GetView().ProcessTableMessage(msg)
-        #self.RefreshGrid()    
         msg = wxGridTableMessage(self, wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)
         self.GetView().ProcessTableMessage(msg)
 
+
+    def GetDisplayMapping(self):
+        print "pgefdatatable.getdisplaymapping"
+#        print self.display_map
+#        return self.display_map

Index: PanGalactic/pangalactic/utils/basegrid.py
diff -u PanGalactic/pangalactic/utils/basegrid.py:1.19 PanGalactic/pangalactic/utils/basegrid.py:1.20
--- PanGalactic/pangalactic/utils/basegrid.py:1.19	Fri Mar  5 16:18:15 2004
+++ PanGalactic/pangalactic/utils/basegrid.py	Wed Apr 14 16:48:27 2004
@@ -1,11 +1,11 @@
-from wxPython.wx import *
-from wxPython.grid import *
-from wxPython.lib.gridmovers import wxGridColMover, EVT_GRID_COL_MOVE
-
 import cPickle
 import os
 import ConfigParser
 
+from wxPython.wx import *
+from wxPython.grid import *
+from wxPython.lib.gridmovers import wxGridColMover, EVT_GRID_COL_MOVE
+
 from pangalactic.utils import pdfoptions        
 from pangalactic.utils import objectreport      
 from pangalactic.utils import pgefevents        
@@ -39,38 +39,24 @@
     """wrapper for the grid that adds the drag and drop functionality to
     the base grid class.  Also adds the ability to set the labels for the
     grid columns and to fill a row of data given the data in a list format"""
-    def __init__(self, parent, id, savename = None, dbroot = None, intable = None):
+    def __init__(self, parent, id, classname = None, localdb = None, intable = None):
         wxGrid.__init__(self, parent, id)
-        #print "\nbasegrid.init"
         self.SetColLabelSize(48)
-        self.AutoSizeColumns(true)
+        self.AutoSizeColumns(True)
 
+        self.localDB = localdb
         if intable:
             self.table = intable
         else:
             self.table = pgefdatatable.PgefDataTable()
-        self.SetTable(self.table, true)
+        self.SetTable(self.table, True)
 
         self.moveTo = None
         self.DropVariable = None
-        self._displayed_objs = []
         self.allow_config_flag = 1
-        self.already_showing_config = 0
-        self.dbroot = dbroot
-        self.savename = savename
-        if len(self.table.GetDisplayMapping()) == 0:
-            #print "basegrid.init.displaymapping empty", savename
-            self.DisplayMapping = self.RetrieveDisplay()
-            #if self.DisplayMapping:
-                #print "displaymapping", self.DisplayMapping[0]
-            #else:
-                #print "displaymapping", self.DisplayMapping
-            self.table.SetDisplayMapping(self.DisplayMapping)
-        else:
-            #print "basegrid.init.displaymapping exists", savename
-            self.DisplayMapping = self.table.GetDisplayMapping()
-        self.RefreshDisplay(self.DisplayMapping)
-
+        self.classname = classname
+        self.current_config = self.localDB.getDisplayConfig()
+        
         evthandler = pgefevents.PgefDragDropHandler(self)            
 
         EVT_MOTION(self.GetGridWindow(), self.OnMove)
@@ -85,7 +71,7 @@
 
         self.PushEventHandler(evthandler)
         wxGridColMover(self)
-        self.SetDefaultCellOverflow(false)
+        self.SetDefaultCellOverflow(False)
         self.FitInside()
         EVT_GRID_COL_MOVE(self,self.GetId(),self.OnColMove)
         #print "end basegrid.init"
@@ -108,17 +94,19 @@
         for columntype in typelist:
             attr = wxGridCellAttr()
             if columntype == 'bool':
+                print "have bool"
                 attr.SetEditor(wxGridCellBoolEditor())
-                attr.SetReadOnly(false)
+                attr.SetReadOnly(False)
 
             elif columntype == 'image':
+                print "have image"
                 attr.SetBackgroundColour(wxGREEN)
 #                attr.SetRenderer(MyCustomRenderer(self.gridimage))
-                attr.SetReadOnly(true)
+                attr.SetReadOnly(True)
                 
             else:
                 attr.SetEditor(wxGridCellTextEditor())             
-                attr.SetReadOnly(true)
+                attr.SetReadOnly(True)
 
             self.SetColAttr(column, attr)
             
@@ -157,7 +145,7 @@
             try:
                 self.ForceRefresh()
             except:
-                self.Refresh(true)
+                self.Refresh(True)
 
             
     def OnMove(self, event):
@@ -174,8 +162,6 @@
             
     def OnRightDown(self, event):
         if event.GetId() == self.GetId():
-            #print self.table.display_mapping
-            #print self.table.identifiers
             menu = wxMenu()
             x,y = event.GetPosition()
             menu.Append(ID_POPUP_CLEAR_SELECTION, 'Clear Current Selection')
@@ -194,11 +180,11 @@
         """Handles the data encapsulation and packaging for the drag and drop"""
 
         if selectedrow < 0:
-            return false
+            return False
 
         itemid = self.GetObjectOid(selectedrow) 
         if itemid == '':
-            return false
+            return False
         
         data = [None, itemid, "GRID", self.GetId()]
         datapickle = cPickle.dumps(data, 1)
@@ -206,7 +192,7 @@
         dragitem.SetData(datapickle)
         dropSource = wxDropSource(self)
         dropSource.SetData(dragitem)
-        dropSource.DoDragDrop(true)
+        dropSource.DoDragDrop(True)
 
         
     def CanConfigDisplay(self):
@@ -220,63 +206,47 @@
         self.table.ClearTableBase()
 
         
-#    def GetDataObj(self, ndx):
-#        #print "basegrid.getdataobj"
-#        return self.table._data[ndx]
-
-            
     def RefreshFromObjects(self):
         self.table.RefreshGrid()
         self.FitInside()
 
 
     def AddData(self, data, colour = None):
-        #print "\nbasegrid.adddata"
         self.BeginBatch()
         nrows = self.GetNumberRows()
         if isinstance(data, types.ListType):
-            #print "list"
             for obj in data:
                 self.table.AddData(obj)
         else:
-            #print "obj"
             self.table.AddData(data)
-            #print "end obj"
-        #print "autosize"
-        self.AutoSizeColumns(true)
-        #print "end autosize"
-        #print "fit"
+        self.AutoSizeColumns(True)
         self.FitInside()
-        #print "end fit"
         self.EndBatch()
 
         # set the background colour of the row(s), if any is specified
-        #print "setbackcolour"
         if colour:
             new_nrows = self.GetNumberRows()
             rowlist = [rownum + nrows for rownum in range(new_nrows - nrows)]
             self.SetRowBackgroundColour(rowlist, colour)
-        #print "setbackcolour done"
-
-        #print "end basegrid.adddata"
             
 
-    def DefaultBackgroundColour(self):
-        """Reset the grid background for all rows to the default colour."""
-        nrows = self.GetNumberRows()
-        #somecol = 0
-        for row in range(nrows):
-            # print "set bg colour for row: " + str(row)
-            # get the attr for the wxAttrKind.Row (= 3)
-            # GetAttr needs the type of attr to get, despite what the docs say
-            attr = self.GetTable().GetAttr(row, 0, 3)
-            if attr:
-                attr.SetBackgroundColour(self.GetDefaultCellBackgroundColour())
-                self.SetRowAttr(row, attr)
-            #found = true
+##    def DefaultBackgroundColour(self):
+##        """Reset the grid background for all rows to the default colour."""
+##        nrows = self.GetNumberRows()
+##        #somecol = 0
+##        for row in range(nrows):
+##            # print "set bg colour for row: " + str(row)
+##            # get the attr for the wxAttrKind.Row (= 3)
+##            # GetAttr needs the type of attr to get, despite what the docs say
+##            attr = self.GetTable().GetAttr(row, 0, 3)
+##            if attr:
+##                attr.SetBackgroundColour(self.GetDefaultCellBackgroundColour())
+##                self.SetRowAttr(row, attr)
+##            #found = True
 
         
     def SetColBackgroundColour(self, col, colour):
+        print "base.setcolbackgroundcolour"
         numrows = self.GetNumberRows()
         for row in range(numrows):
             self.SetCellBackgroundColour(row, col, colour)
@@ -315,7 +285,7 @@
 ##                if attr:
 ##                    attr.SetBackgroundColour(self.GetDefaultCellBackgroundColour())
 ##                    self.SetRowAttr(row, attr)
-##                found = true
+##                found = True
 
 ##        self.EndBatch()           
         
@@ -325,9 +295,11 @@
         gridrows = self.GetNumberRows()
         if gridrows <= 0:
             return
+
         dlg = pdfoptions.PDFOptions(self)
         dlg.Layout()
         result = dlg.ShowModal()
+
         if result == wxID_OK:
             filename = dlg.filename.GetValue()
             if not filename.endswith('.pdf'):
@@ -356,103 +328,108 @@
                                              tabular = tabular,
                                              hidegridlines = hide_gridlines)
             
-            temp.display_map = self.DisplayMapping
+            temp.display_map = self.current_config
             temp.generate()
 
 
-    def RetrieveDisplay(self):
-        #print "basegrid.retrievedisplay", self.savename
-        done = None
-        if self.dbroot and self.savename:
-            #print "dbroot and savename"
-            if self.dbroot.has_key('config_grid'):
-                #print "config_grid"
-                if self.dbroot['config_grid'].has_key(self.savename):
-                    #print "have key", self.savename
-                    done = self.dbroot['config_grid'][self.savename]
-        else:
-            #print "not (dbroot and savename)"
-            config = ConfigParser.ConfigParser()
-            tmppath = os.path.join("data", "grid.ini")
-            if os.path.exists(tmppath):
-                #print "have ini file"
-                config.read(tmppath)
-                temp = config.get(self.savename, 'display')
-                temp = temp.replace("'", "")
-                temp = temp[2:-2]
-                temp = temp.split('), (')
-                done = [element.split(',') for element in temp]
-        #print "end retrievedisplay"
-        return done
+#    def RetrieveDisplay(self):
+#        print "basegrid.retrievedisplay"
+#        mapping = None
+#        config = self.localDB.getDisplayConfig()
+#        if config.has_key(self.classname):
+#            mapping = config[self.classname]
+#
+#        return mapping
+        
+#        if self.dbroot:
+#            print "have dbroot"
+#        if self.dbroot and self.savename:
+#            print "dbroot and savename"
+##            if self.dbroot.has_key('config_grid'):
+##                #print "config_grid"
+##                if self.dbroot['config_grid'].has_key(self.savename):
+##                    #print "have key", self.savename
+##                    mapping = self.dbroot['config_grid'][self.savename]
+#            if self.dbroot.has_key("display_config"):
+#                config = self.dbroot["display_config"]
+#                if config.has_key(self.classname):
+#                    mapping = config[self.classname]
+##        else:
+##            print "no dbroot; assume .ini file"
+##            config = ConfigParser.ConfigParser()
+##            tmppath = os.path.join("data", "grid.ini")
+##            if os.path.exists(tmppath):
+##                #print "have ini file"
+##                config.read(tmppath)
+##                temp = config.get(self.classname, 'display')
+##                temp = temp.replace("'", "")
+##                temp = temp[2:-2]
+##                temp = temp.split('), (')
+##                mapping = [element.split(',') for element in temp]
+##        #print "end retrievedisplay"
+##        return mapping
                 
             
-    def SaveDisplay(self, display_list):
+    def WriteDisplay(self, display_list):
         #print "save display config"
         #if display_list:
             #print "displaylist", display_list[0]
         #else:
             #print "displaylist", display_list
-        if self.dbroot:
+        #if self.dbroot:
             #print "save to zodb"
-            temp = {}
-            temp[self.savename] = display_list
-            self.dbroot['config_grid'] = temp
-            get_transaction().commit()
             
-        if self.savename:
-            #print 'save to file', self.savename
+        if self.classname:
             config = ConfigParser.ConfigParser()
             tmppath = os.path.join("data", "grid.ini")
             if os.path.exists(tmppath):
                 #print "ini exists"
                 config.read(tmppath)
-                if config.has_section(self.savename):
+                if config.has_section(self.classname):
                     #print "removing section"
-                    config.remove_section(self.savename)
+                    config.remove_section(self.classname)
 
 #            outfile = open(tmppath, 'ab') # config is in memory; don't append; overwrite.
             outfile = open(tmppath, "w+")
-            config.add_section(self.savename)
-            config.set(self.savename, 'display', display_list)
+            config.add_section(self.classname)
+            config.set(self.classname, 'display', display_list)
             config.write(outfile)
             outfile.close()
 
             
     def ConfigGrid(self, event = None):
         #print "basegrid.configgrid"
-        #if not self.already_showing_config:
-        #print 'call config screen'
         tmpsize = wxSize(750, 500)
-        testframe = wxDialog(self, -1, 'Customize Grid Layout', wxDefaultPosition, tmpsize,
-                    style = wxCAPTION | wxSYSTEM_MENU | wxTHICK_FRAME )
-        #if self.DisplayMapping:
-            #print "oldmapping", self.DisplayMapping[0]
-        #else:
-            #print "oldmapping", self.DisplayMapping
-        testframe.mainpanel = ConfigureGrid(testframe, -1,
-                                            disp_objs = self.table._data,
-                                            old_mapping = self.DisplayMapping)
-        testframe.CentreOnParent()
-        result = testframe.ShowModal()
+        gridframe = wxDialog(self, -1, 'Customize Grid Layout', wxDefaultPosition, tmpsize,
+                             style = wxCAPTION | wxSYSTEM_MENU | wxTHICK_FRAME )
+
+        if len(self.table._data) > 0:
+            classname = self.table._data[0].__class__.__name__
+        else:
+            gridframe = None
+            print "Sorry, nothing to configure."
+            return 
+
+        gridframe.mainpanel = ConfigureGrid(gridframe, -1,
+                                            localdb = self.localDB,
+                                            collection_name = classname,
+                                            current_config = self.current_config)
+        gridframe.CentreOnParent()
+        result = gridframe.Show(True)
         if result == wxID_OK:
-            #print "ok to save"
-            self.DisplayMapping = testframe.mainpanel.GetDisplayList()
-            #if self.DisplayMapping:
-                #print "newmapping", self.DisplayMapping[0]
-            #else:
-                #print "newmapping", self.DisplayMapping
-            self.SaveDisplay(self.DisplayMapping)
-            self.RefreshDisplay(self.DisplayMapping)
+            displaymap = gridframe.mainpanel.GetDisplayList()
+            self.RefreshDisplay(displaymap)
+            self.WriteDisplay(displaymap)
+            self.current_config[classname] = displaymap
+            self.localDB.setDisplayConfig(self.current_config)
 
 
-    def RefreshDisplay(self, displaymapping = None):
-        #print "basegrid.refreshdisplay"
-        if displaymapping:
-            self.table.SetDisplayMapping(displaymapping)
-        else:
-            self.table.SetDisplayMapping(self.DisplayMapping)
-        self.table.RefreshGrid()
-        self.AutoSizeColumns()
+    def RefreshDisplay(self, displaymap):
+        print "basegrid.refreshdisplay"
+        if displaymap:
+            self.table.setDisplayMap(displaymap)
+            self.table.RefreshGrid()
+            self.AutoSizeColumns()
 
         
     def GetObjectOid(self, row):

Index: PanGalactic/pangalactic/utils/dbbrowser.py
diff -u PanGalactic/pangalactic/utils/dbbrowser.py:1.17 PanGalactic/pangalactic/utils/dbbrowser.py:1.18
--- PanGalactic/pangalactic/utils/dbbrowser.py:1.17	Thu Apr  8 12:27:55 2004
+++ PanGalactic/pangalactic/utils/dbbrowser.py	Wed Apr 14 16:48:27 2004
@@ -16,26 +16,24 @@
 import types
 
 import pangalactic.utils.toolframe as toolframe
-
 from pangalactic.utils.dbbrowser_wdr import *
-import pangalactic.utils.configdbbrowser as configdbbrowser
+import pangalactic.utils.configuregrid as configuregrid
+import pangalactic.utils.localdb as localdb
 
 DEBUG = 1
-DISPLAY_CONFIG = "display_config"
 
 COMPLEX_CLASS_TYPES = ["Project", "Acu", "Part", "Model", "Document", "DocPtRel",
                        "WfActivity", "WfProcess", "WfTransition", "WfEventAudit"]
 DOC_CLASS_TYPES     = ["PgefAdvisory", "NasaAdvisory",
                        "GidepAlert", "GidepProblemAdvisory", "NasaImpactStatement"]
-EXCLUDE_LIST = ["UncommittedObjects"]
+EXCLUDE_LIST = ["UncommittedObjects", "ProjectObjects"]
 
 class zodbbrowser(wxPanel):
-    def __init__(self, parent, id,
-                 pos = wxDefaultPosition, size = wxDefaultSize, localdb = None):
+    def __init__(self, parent, id, localdb,
+                 pos = wxDefaultPosition, size = wxDefaultSize):
         wxPanel.__init__(self, parent, id, pos, size, style = wxTHICK_FRAME)
         self.Parent = parent
         self.localDB = localdb
-        self.dbroot = localdb.dbroot
         self.dbfile = None
         self.current_config = {}
         ZODBBrowserFunc(self, true)
@@ -61,25 +59,19 @@
     def GetGrid(self):
         return wxPyTypeCast(self.FindWindowById(ID_GRID), "wxGrid")
     
-    def FillChoice(self, config = None):
+    def FillChoice(self, config = localdb.god):
         choice = self.GetRootitems()
         choice.Clear()
-        items = self.dbroot.keys()
-        items.sort()
-
-        if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
-            items.remove(configdbbrowser.DISPLAY_CONFIG)
 
+        items = []
         if config:
             for dictname, clearflag, config_access in self.localDB.dictlist:
-                if config_access > config:
-                   items.remove(dictname)
+                if config_access <= config:
+                   items.append(dictname)
+        items.sort()
 
         choice.InsertItems(items, 0)
 
-        # for now, do not automatically select a dictionary
-        #choice.SetSelection(0)
-        
         
     def ClearGrid(self):
         gridrows = self.grid.GetNumberRows()
@@ -101,58 +93,59 @@
             self.dbfile = file
 
 
-    def AddMenuForStandalone(self):
-        mb = self.GetParent().GetMenuBar()
-        menu = mb.GetMenu(mb.FindMenu('File'))
-        self.FILEOPEN = wxNewId()
-        menu.Insert(0, self.FILEOPEN, '&Open file')
-        self.FILECLOSE = wxNewId()
-        menu.Insert(1, self.FILECLOSE, '&Close file')
-        menu.InsertSeparator(2)
-        self.FILECONFIG = wxNewId()
-        menu.Insert(3, self.FILECONFIG, 'Create config file...')
-        menu.InsertSeparator(4)
-        mb.Refresh()
-        EVT_MENU(self.Parent, self.FILEOPEN, self.FileOpen)
-        EVT_MENU(self.Parent, self.FILECLOSE, self.FileClose)
-        EVT_MENU(self.Parent, self.FILECONFIG, self.FileConfig)
+##    def AddMenuForStandalone(self):
+##        mb = self.GetParent().GetMenuBar()
+##        menu = mb.GetMenu(mb.FindMenu('File'))
+##        self.FILEOPEN = wxNewId()
+##        menu.Insert(0, self.FILEOPEN, '&Open file')
+##        self.FILECLOSE = wxNewId()
+##        menu.Insert(1, self.FILECLOSE, '&Close file')
+##        menu.InsertSeparator(2)
+##        self.FILECONFIG = wxNewId()
+##        menu.Insert(3, self.FILECONFIG, 'Create config file...')
+##        menu.InsertSeparator(4)
+##        mb.Refresh()
+##        EVT_MENU(self.Parent, self.FILEOPEN, self.FileOpen)
+##        EVT_MENU(self.Parent, self.FILECLOSE, self.FileClose)
+##        EVT_MENU(self.Parent, self.FILECONFIG, self.FileConfig)
         
 
     def GetDisplayConfig(self):
-        if self.dbroot:
-            if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
-                if self.dbroot[configdbbrowser.DISPLAY_CONFIG]:
-                    self.current_config = self.dbroot[configdbbrowser.DISPLAY_CONFIG]
+        self.current_config = self.localDB.getDisplayConfig()
         if len(self.current_config) == 0:
-            print "no config; setup default config.  tbd"
+            print "no config; setup default config?", self.current_config
+            for dictname, keepflag, access_level in self.localDB.dictlist:
+                self.current_config[dictname] = []
+            self.localDB.setDisplayConfig(self.current_config)
+            print "current_config", self.current_config
             
-        
-    def FileOpen(self, event = None):
-        wildcard = "ZODB FileStorage (*.fs)|*.fs|" \
-                   "All files (*.*)|*.*"
-        dlg = wxFileDialog(self, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE)
-        if dlg.ShowModal() == wxID_OK:
-            if self.dbroot:
-                self.FileClose()
-            self.storage = FileStorage.FileStorage(dlg.GetPath())
-            self.db = DB(self.storage)
-            self.dbconnection = self.db.open()
-            self.dbroot = self.dbconnection.root()
-            if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
-                self.current_config = self.dbroot[configdbbrowser.DISPLAY_CONFIG]
-            self.FillChoice()
-        dlg.Destroy()
+                
+            
+##    def FileOpen(self, event = None):
+##        wildcard = "ZODB FileStorage (*.fs)|*.fs|All files (*.*)|*.*"
+##        dlg = wxFileDialog(self, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE)
+##        if dlg.ShowModal() == wxID_OK:
+##            if self.dbroot:
+##                self.FileClose()
+##            self.storage = FileStorage.FileStorage(dlg.GetPath())
+##            self.db = DB(self.storage)
+##            self.dbconnection = self.db.open()
+##            self.dbroot = self.dbconnection.root()
+##            if self.dbroot.has_key(localdb.DISPLAY_CONFIG):
+##                self.current_config = self.dbroot[localdb.DISPLAY_CONFIG]
+##            self.FillChoice()
+##        dlg.Destroy()
 
     
-    def FileClose(self, event = None):
-        self.dbconnection.close()
-        self.db.close()
-        self.storage.close()
-        self.dbconnection = None
-        self.db = None
-        self.storage = None
-        self.ClearGrid()
-        self.GetRootitems().Clear()
+##    def FileClose(self, event = None):
+##        self.dbconnection.close()
+##        self.db.close()
+##        self.storage.close()
+##        self.dbconnection = None
+##        self.db = None
+##        self.storage = None
+##        self.ClearGrid()
+##        self.GetRootitems().Clear()
 
         
     def FileConfig(self, event = None):
@@ -160,12 +153,12 @@
         if collection_name:
             tmpsize = wxSize(750, 500)
             cfg_frame = toolframe.toolFrame(self, -1, 'Configure DB Browser', wxDefaultPosition, tmpsize)
-            cfg_frame.mainpanel = configdbbrowser.ConfigDbBrowser(cfg_frame, -1,
-                                                                  dbroot = self.dbroot,
-                                                                  collection_name = collection_name,
-                                                                  current_config = self.current_config)
+            cfg_frame.mainpanel = configuregrid.ConfigureGrid(cfg_frame, -1,
+                                                              localdb = self.localDB,
+                                                              collection_name = collection_name,
+                                                              current_config = self.current_config)
             cfg_frame.CentreOnParent()
-            cfg_frame.Show(true)
+            cfg_frame.Show(True)
         else:
             errdlg = wxMessageDialog(self, "Select an entry from the list.", "No Entry Selected",
                                      wxOK|wxCENTRE|wxICON_EXCLAMATION)
@@ -173,18 +166,18 @@
             errdlg.ShowModal()
 
         
-    def setColLabels(self, selection):
-#        print "dbbrowser.setcollabels", selection
-        if self.current_config.has_key(selection):
-            numcols = self.grid.GetNumberCols()
-            if numcols > 0:
-                self.grid.DeleteCols(0, numcols)
+##    def setColLabels(self, selection):
+###        print "dbbrowser.setcollabels", selection
+##        if self.current_config.has_key(selection):
+##            numcols = self.grid.GetNumberCols()
+##            if numcols > 0:
+##                self.grid.DeleteCols(0, numcols)
                 
-            mapping = self.current_config[selection]
-            self.grid.AppendCols(len(mapping))
+##            mapping = self.current_config[selection]
+##            self.grid.AppendCols(len(mapping))
 
-            for col in range(len(mapping)):
-                self.grid.SetColLabelValue(col, mapping[col][1])
+##            for col in range(len(mapping)):
+##                self.grid.SetColLabelValue(col, mapping[col][1])
                 
 
     def compareMapping(self, left, right):
@@ -195,95 +188,104 @@
         else:
             return 0
         
+
+    def newConfigEntry(self, selection, collection_dict):
+        # how many columns should there be?
+        maxcols = 0
+        mapping = {}
+        for obj_id, obj in collection_dict.items():
+            if hasattr(obj, "__dict__"):
+                try:
+                    maxcols = len(obj.__dict__)
+                    self.grid.AppendCols(maxcols)
+                    attr_keys = obj.__dict__.keys()
+                    mapping = []
+                    col = 0
+                    # make the column labels (attribute names) look pretty
+                    for attr_key in attr_keys:
+                        col_label = attr_key.replace("_", " ").title().strip()
+                        mapping.append((attr_key, col_label))
+                        col += 1
+
+                    if len(mapping) > 0:
+                        mapping.sort(self.compareMapping)
+                        for col in range(len(mapping)):
+                            self.grid.SetColLabelValue(col, mapping[col][1])
+                    break
+                except:
+                    print "Sorry.  Ungriddable object.  Better luck next time."
+                    return {}
+
+            elif isinstance(obj, types.StringType):
+                maxcols = 2
+                self.grid.AppendCols(maxcols)
+                self.grid.SetColLabelValue(0, "Id")
+                self.grid.SetColLabelValue(1, "Value")
+                break
+
+            elif (isinstance(obj, types.DictType) or
+                  isinstance(obj, types.ListType)):
+                maxcols = 2
+                self.grid.AppendCols(maxcols)
+                self.grid.SetColLabelValue(0, "Name")
+                self.grid.SetColLabelValue(1, "Elements")
+                break
+
+            else:
+                print "dbbrowser.fillgrid: only objects or strings", selection
+                return {}
+        return mapping
+    
         
     def FillGrid(self, event = None):
-        if self.dbroot:
-            selection = self.GetRootitems().GetStringSelection()
+        if self.localDB:
+            self.ClearGrid()
+            if self.grid.GetNumberCols() > 0:
+                self.grid.DeleteCols(0, self.grid.GetNumberCols())
+            if self.grid.GetNumberRows() > 0:
+                self.grid.DeleteRows(0, self.grid.GetNumberRows())
 
+            selection = self.GetRootitems().GetStringSelection()
             if selection in EXCLUDE_LIST:
                 print selection, "is not yet implemented"
-                self.ClearGrid()
-                if self.grid.GetNumberCols() > 0:
-                    self.grid.DeleteCols(0, self.grid.GetNumberCols())
-                if self.grid.GetNumberRows() > 0:
-                    self.grid.DeleteRows(0, self.grid.GetNumberRows())
                 return
 
             # how many rows should there be?
-            collection_dict = self.dbroot[selection]
-            self.ClearGrid()
+            collection_dict = self.localDB.getDict(selection)
             numrows = len(collection_dict)
             if numrows > 0:
                 self.grid.AppendRows(numrows)
-                
-            # make sure the grid has the correct number of columns
-            # and set the column labels
-            if self.dbroot.has_key(configdbbrowser.DISPLAY_CONFIG):
-                self.current_config = self.dbroot[DISPLAY_CONFIG]
 
-            #displayed_fields = []
+            # look for a configuration entry, and append the columns
+            self.current_config = self.localDB.getDisplayConfig()
             if self.current_config.has_key(selection) and (len(self.current_config[selection]) > 0):
                 # there is an entry in the configuration dictionary
                 mapping = self.current_config[selection]
-                self.setColLabels(selection)
-                #displayed_fields = [disp_col[0] for disp_col in mapping]
+                self.grid.AppendCols(len(mapping))
+                for col in range(len(mapping)):
+                    self.grid.SetColLabelValue(col, mapping[col][1])
+
             else:
-                # there is no entry in the configuration dictionary;
-                # generate default configuration and put it in dbroot
-                if self.grid.GetNumberCols() > 0:
-                    self.grid.DeleteCols(0, self.grid.GetNumberCols())
-                
-                # how many columns should there be?
-                maxcols = 0
-                for obj_id, obj in collection_dict.items():
-                    if hasattr(obj, "__dict__"):
-                        try:
-                            maxcols = len(obj.__dict__)
-                            self.grid.AppendCols(maxcols)
-                            attr_keys = obj.__dict__.keys()
-                            mapping = []
-                            col = 0
-                            # make the column labels (attribute names) look pretty
-                            for attr_key in attr_keys:
-                                col_label = attr_key.replace("_", " ").title().strip()
-                                mapping.append((attr_key, col_label))
-                                col += 1
-
-                            if len(mapping) > 0:
-                                self.current_config[selection] = mapping
-                                self.dbroot[DISPLAY_CONFIG] = self.current_config
-
-                                mapping.sort(self.compareMapping)
-                                for col in range(len(mapping)):
-                                    self.grid.SetColLabelValue(col, mapping[col][1])
-                            break
-                        except:
-                            print "Sorry.  Ungriddable object.  Try again."
-                            return
+                # there is no entry in the configuration dictionary
+                # for the selected name;
+                # generate and save the default configuration
+                mapping = self.newConfigEntry(selection, collection_dict)    
+                if len(mapping) > 0:
+                    self.current_config[selection] = mapping
+                    self.localDB.setDisplayConfig(self.current_config)
 
-                    elif isinstance(obj, types.StringType):
-                        maxcols = 2
-                        self.grid.AppendCols(maxcols)
-                        self.grid.SetColLabelValue(0, "Id")
-                        self.grid.SetColLabelValue(1, "Value")
-                        break
-
-                    else:
-                        print "dbbrowser.fillgrid: only objects or strings", selection
-                        return
-                    
             # fill in the grid cells
             curr_row = 0
             col = 0
             for obj_id, obj in collection_dict.items():
-                if isinstance(obj, types.StringType):
+                if (isinstance(obj, types.StringType) or
+                    isinstance(obj, types.DictType) or
+                    isinstance(obj, types.ListType)):
                     self.grid.SetCellValue(curr_row, 0, obj_id)
                     self.grid.SetCellValue(curr_row, 1, str(obj))
 
-                elif hasattr(obj, "__dict__"):
-                    #for col in range(len(displayed_fields)):
+                elif hasattr(obj, "__dict__"):  # tbd - do this a better way
                     for col in range(len(mapping)):
-                        #attr = displayed_fields[col]
                         attr = mapping[col][0]
                         attrvalue = obj.__dict__[attr]
                         try:
@@ -310,29 +312,28 @@
                         self.grid.SetCellValue(curr_row, col, val)
                         col += 1
                 else:
-                    print "wtf"
+                    print "wtf", obj_id
 
                 curr_row += 1
                     
             self.grid.AutoSizeColumns(true)
 
 
-
-#----------------------------------------------------------------------------
-if __name__ == '__main__':
-    wxInitAllImageHandlers()
+###----------------------------------------------------------------------------
+##if __name__ == '__main__':
+##    wxInitAllImageHandlers()
     
-    class ZODBBrowser(wxApp):
+##    class ZODBBrowser(wxApp):
             
-        def OnInit(self):
-            self.frame = toolframe.toolFrame(NULL, -1, 'ZODB Browser', wxDefaultPosition, wxSize(640, 480))
-            self.frame.mainpanel = zodbbrowser(self.frame, -1, zodbroot = None)
-            self.frame.mainpanel.AddMenuForStandalone()
-            self.frame.CentreOnParent()                              
-            self.frame.Show(true)
+##        def OnInit(self):
+##            self.frame = toolframe.toolFrame(NULL, -1, 'ZODB Browser', wxDefaultPosition, wxSize(640, 480))
+##            self.frame.mainpanel = zodbbrowser(self.frame, -1, zodbroot = None)
+##            self.frame.mainpanel.AddMenuForStandalone()
+##            self.frame.CentreOnParent()                              
+##            self.frame.Show(true)
     
-            return true
+##            return true
     
-    app = ZODBBrowser(0)
-    app.MainLoop()
+##    app = ZODBBrowser(0)
+##    app.MainLoop()
 

From pbear at ned.gsfc.nasa.gov  Fri Apr 16 14:33:31 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Fri Apr 16 14:33:33 2004
Subject: [Pangalactic-commits] interim checkin.  just for steve.
Message-ID: <200404161833.i3GIXV4p008914@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/client/modules/psm/psmtool.py 1.160 1.161
PanGalactic/pangalactic/client/modules/psm/searchframe.py 1.35 1.36
PanGalactic/pangalactic/client/tests/test_otherdocform.py 1.3 1.4
PanGalactic/pangalactic/client/tests/test_product.py 1.9 None
PanGalactic/pangalactic/enterprise/acu.py 1.7 1.8
PanGalactic/pangalactic/enterprise/dcu.py 1.9 1.10
PanGalactic/pangalactic/enterprise/docptrel.py 1.6 1.7
PanGalactic/pangalactic/enterprise/document.py 1.47 1.48
PanGalactic/pangalactic/enterprise/model.py 1.6 1.7
PanGalactic/pangalactic/enterprise/ontoclass.py 1.2 1.3
PanGalactic/pangalactic/enterprise/ontoproperty.py 1.2 1.3
PanGalactic/pangalactic/enterprise/organization.py 1.15 1.16
PanGalactic/pangalactic/enterprise/part.py 1.5 1.6
PanGalactic/pangalactic/enterprise/partslist.py 1.18 1.19
PanGalactic/pangalactic/enterprise/person.py 1.16 1.17
PanGalactic/pangalactic/enterprise/pgeffile.py 1.19 1.20
PanGalactic/pangalactic/enterprise/pgefobject.py 1.50 1.51
PanGalactic/pangalactic/enterprise/project.py 1.19 1.20
PanGalactic/pangalactic/enterprise/property.py 1.8 1.9
PanGalactic/pangalactic/enterprise/role.py 1.8 1.9
PanGalactic/pangalactic/enterprise/versionedobject.py 1.5 1.6
PanGalactic/pangalactic/enterprise/workflow/wfactivity.py 1.20 1.21
PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py 1.10 1.11
PanGalactic/pangalactic/enterprise/workflow/wffactory.py 1.18 1.19
PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py 1.17 1.18
PanGalactic/pangalactic/enterprise/workflow/wfprocess.py 1.25 1.26
PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py 1.31 1.32
PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py 1.15 1.16
PanGalactic/pangalactic/utils/__init__.py 1.9 1.10
PanGalactic/pangalactic/utils/basegrid.py 1.20 1.21
PanGalactic/pangalactic/utils/configuredisplay.py 1.10 1.11
PanGalactic/pangalactic/utils/configuregrid.py 1.4 1.5
PanGalactic/pangalactic/utils/datamanager.py 1.95 1.96
PanGalactic/pangalactic/utils/dbbrowser.py 1.18 1.19
PanGalactic/pangalactic/utils/localdb.py 1.77 1.78
PanGalactic/pangalactic/utils/mappinggrid.py 1.8 1.9
PanGalactic/pangalactic/utils/pgefdatatable.py 1.8 1.9
PanGalactic/pangalactic/utils/xmlrpcinterface.py 1.48 1.49

Log message:
interim checkin.  just for steve.


Index: PanGalactic/pangalactic/enterprise/partslist.py
diff -u PanGalactic/pangalactic/enterprise/partslist.py:1.18 PanGalactic/pangalactic/enterprise/partslist.py:1.19
--- PanGalactic/pangalactic/enterprise/partslist.py:1.18	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/partslist.py	Fri Apr 16 14:32:57 2004
@@ -1,11 +1,11 @@
-# $Id: partslist.py,v 1.18 2004/04/14 20:48:26 pbear Exp $
+# $Id: partslist.py,v 1.19 2004/04/16 18:32:57 pbear Exp $
 
 """
 A Document consisting of a collection of Part references and
 associated data.
 """
 
-__version__ = "$Revision: 1.18 $"[11:-2]
+__version__ = "$Revision: 1.19 $"[11:-2]
 
 from pangalactic.enterprise.document import Document
 
@@ -15,11 +15,10 @@
     associated data.
     """
     _contains = Document._contains.copy()
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
     _excluded_fields = []
     _fk = {}
+
+# need to go over this; I think it's out of date; postpone _default_display_xxx until then
 #    _gridmap = [
 #                ['Partslist ID', 'self.id', 'string'],
 #                ['Project\nName Code', 'self._project.id', 'string'],

Index: PanGalactic/pangalactic/enterprise/ontoproperty.py
diff -u PanGalactic/pangalactic/enterprise/ontoproperty.py:1.2 PanGalactic/pangalactic/enterprise/ontoproperty.py:1.3
--- PanGalactic/pangalactic/enterprise/ontoproperty.py:1.2	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/ontoproperty.py	Fri Apr 16 14:32:57 2004
@@ -1,4 +1,4 @@
-# $Id: ontoproperty.py,v 1.2 2004/04/14 20:48:26 pbear Exp $
+# $Id: ontoproperty.py,v 1.3 2004/04/16 18:32:57 pbear Exp $
 
 """
 An attribute whose definition can be managed.
@@ -19,9 +19,6 @@
     # TODO: add attributes used in IEC 61360 and RosettaNet
     # dictionaries
 
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     # pgef_oid, create_datetime, and mod_datetime are excluded
     # fields because they receive non-null default values at
     # initialization time.
@@ -32,10 +29,8 @@
                        ]
     _excluded_dump = []
     _fk = {}
-#    _gridmap = [ ['ID', 'self.id'],
-#                 ['Context' , 'self.id_context'],
-#                 ['Name' , 'self.name'],
-#                 ['Definition' , 'self.long_description'] ]
+    _default_display_order = ["id", "id_context", "name", "long_description"]
+    _default_display_names = {"id": "ID", "id_context": "Context", "name": "Name", "long_description": "Definition"}
     _properties = {}
     _required = []
     _refs = {}

Index: PanGalactic/pangalactic/enterprise/workflow/wfprocess.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.25 PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.26
--- PanGalactic/pangalactic/enterprise/workflow/wfprocess.py:1.25	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfprocess.py	Fri Apr 16 14:32:58 2004
@@ -29,10 +29,6 @@
     that an existing WfProcess is a state of the workflow.  
     """    
 
-#    _defaultgridmap = [["Name", "self.name", "string", ""]]
-
-#    _gridmap = [["Name", "self.name", "string", ""]]
-
     _default_display_names = {"name" : "Name"}
     _default_display_order = ["name"]
     _default_display_types = {}
@@ -40,13 +36,13 @@
     _properties = {"activity_id"      : "str",
                    "default_start_id" : "str"}
 
-    _instance_display_names = {"wfdata_name" : "Workflow Data",
-                               "_nstates" : "# Steps",
-                               "_activity_name" : "Status",
-                               "_activity_date_str" : "Status Date",
+    _instance_display_names = {"wfdata_name"            : "Workflow Data",
+                               "_nstates"               : "# Steps",
+                               "_activity_name"         : "Status",
+                               "_activity_date_str"     : "Status Date",
                                "_activity_due_date_str" : "Due Date",
-                               "_next_activity_name" : "Pending\nAction",
-                               "name" : "Template\nName"}
+                               "_next_activity_name"    : "Pending Action",
+                               "name"                   : "Template Name"}
                      
     _instance_display_order = ["wfdata_name",
                                "_nstates",
@@ -135,8 +131,9 @@
             dnames = self._instance_display_names
             dorder = self._instance_display_order
             dtypes = self._instance_display_types
-            
-        return [[dnames.get(x, x), x, dtypes.get(x, 'string')] for x in dorder]
+
+        foo = [[x, dnames.get(x, x), dtypes.get(x, 'string')] for x in dorder]
+        return foo
 
         
     def calcTransitions(self):

Index: PanGalactic/pangalactic/utils/__init__.py
diff -u PanGalactic/pangalactic/utils/__init__.py:1.9 PanGalactic/pangalactic/utils/__init__.py:1.10
--- PanGalactic/pangalactic/utils/__init__.py:1.9	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/utils/__init__.py	Fri Apr 16 14:32:58 2004
@@ -3,13 +3,10 @@
 "aboutbox_gui",
 "acrobat5",
 "acrobatwrapper",
-#"advisoryfonts",
 "reportfonts",
-#"advisoryreport",
 "basegrid",
-"configdbbrowser",
 "convertimage",
-#"configuregrid",
+"configuregrid",
 "configuredisplay",
 "customizegrid_gui",
 "datamanager",

Index: PanGalactic/pangalactic/enterprise/workflow/wffactory.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.18 PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.19
--- PanGalactic/pangalactic/enterprise/workflow/wffactory.py:1.18	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wffactory.py	Fri Apr 16 14:32:58 2004
@@ -178,7 +178,7 @@
 
 
 def getDefaultWorkflows():
-    print "\n\nwffactory.getdefaultworkflows"
+    #print "\n\nwffactory.getdefaultworkflows"
     processes = []
     for default_workflow in DEFAULT_WORKFLOWS:
         wfpname = default_workflow[0]
@@ -216,8 +216,8 @@
 
         process.SetActivities(activitydict)
         process.SetTransitionsDict(transitiondict)
-        print "process id", process.pgef_oid, process.name
-        print "\nprocess a", process.activities
+        #print "process id", process.pgef_oid, process.name
+        #print "\nprocess a", process.activities
         #print "\nprocess t", process.transitions
 
         tolist.sort()
@@ -226,11 +226,11 @@
                 fromlist.remove(a)
             except:
                 pass
-        print "fromlist", fromlist
+        #print "fromlist", fromlist
         process.SetDefaultStartId(fromlist[0])
 
         processes.append(process)
-    print "processes", processes
+    #print "processes", processes
     return processes
     
     

Index: PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.17 PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.18
--- PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py:1.17	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfinstanceoverview.py	Fri Apr 16 14:32:58 2004
@@ -62,7 +62,6 @@
         """
     
         WfProcessOverview.__init__(self, parent, state, datamgr, datalist, tablename, ID, pos, size)
-        print "wfinstanceoverview.init"
         self.colourdlg = None
 
 
@@ -120,20 +119,16 @@
         
     def setColourByDueDate(self, wfobj_list):
         msg = "wfinst.setcolour"
-        print msg
         somecol = None
         displaymap = wfobj_list[0]._instance_display_order
-        print displaymap
 
         #for ndx in range(len(displaymap)):
         for ndx in range(len(displaymap)):
             attrname = displaymap[ndx]
-            print "attrname", attrname
             if attrname in COLOURED_ATTRS:
                 somecol = ndx
                 break
 
-        print "col", somecol
         if somecol == None:
             return
 
@@ -171,5 +166,5 @@
             forecolour = workflow_wizard.colourlist[colour_ndx][1]
             self.grid.SetCellBackgroundColour(row, somecol, backcolour)
             self.grid.SetCellTextColour(row, somecol, forecolour)
-            print msg
+#            print msg
 

Index: PanGalactic/pangalactic/client/modules/psm/searchframe.py
diff -u PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.35 PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.36
--- PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.35	Wed Apr 14 16:48:25 2004
+++ PanGalactic/pangalactic/client/modules/psm/searchframe.py	Fri Apr 16 14:32:56 2004
@@ -42,6 +42,7 @@
         self.summarygrid.CreateGrid(0, 2)
         self.summarygrid.SetColLabelValue(0, "Type")
         self.summarygrid.SetColLabelValue(1, "Count")
+        self.summarygrid.SetColLabelSize(30)
         self.summarygrid.SetRowLabelSize(0)
         self.summarygrid.EnableEditing(false)
         grid_tooltip = "A summary of the data found by the search."

Index: PanGalactic/pangalactic/enterprise/versionedobject.py
diff -u PanGalactic/pangalactic/enterprise/versionedobject.py:1.5 PanGalactic/pangalactic/enterprise/versionedobject.py:1.6
--- PanGalactic/pangalactic/enterprise/versionedobject.py:1.5	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/versionedobject.py	Fri Apr 16 14:32:58 2004
@@ -1,11 +1,11 @@
-# $Id: versionedobject.py,v 1.5 2004/04/14 20:48:26 pbear Exp $
+# $Id: versionedobject.py,v 1.6 2004/04/16 18:32:58 pbear Exp $
 
 """
 A thing which evolves in a set of discrete, identified
 incarnations.
 """
 
-__version__ = "$Revision: 1.5 $"[11:-2]
+__version__ = "$Revision: 1.6 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 from pangalactic.enterprise.project import Project
@@ -28,10 +28,8 @@
           }
 
     # These are the fields that will appear in when an item is placed in a grid.
-    # The format for each field is [ Label, attribute, field_type ].
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
+
+# I don't think versionedobject itself will ever be in a grid.  only its subclasses
 #    _gridmap = [
 #                ['Name\nCode','self.name', 'string'],
 #                ['Name','self.short_description', 'string'],

Index: PanGalactic/pangalactic/enterprise/project.py
diff -u PanGalactic/pangalactic/enterprise/project.py:1.19 PanGalactic/pangalactic/enterprise/project.py:1.20
--- PanGalactic/pangalactic/enterprise/project.py:1.19	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/project.py	Fri Apr 16 14:32:57 2004
@@ -1,12 +1,12 @@
-# $Id: project.py,v 1.19 2004/04/14 20:48:26 pbear Exp $
+# $Id: project.py,v 1.20 2004/04/16 18:32:57 pbear Exp $
 
 """
 A specific, identifiable activity of Organizations and Persons.
 
-@version: $Revision: 1.19 $
+@version: $Revision: 1.20 $
 """
 
-__version__ = "$Revision: 1.19 $"[11:-2]
+__version__ = "$Revision: 1.20 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -23,9 +23,6 @@
     """
     A specific, identifiable activity of Organizations and Persons.
     """
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     # These are fields that are excluded from copying or
     # comparisions between Project objects
     _excluded_fields = ['create_datetime',
@@ -34,8 +31,9 @@
     _excluded_dump = []
     _fk = {}
     # These are the fields that will appear in when a Project is
-    # placed in a grid.  The format for each field is 
-    # [ Label, attribute, field_type ].
+    # placed in a grid.  
+
+# do we ever plan to display project data in a grid?
 #    _gridmap = [
 #                ['Project\nAcronym','self.id', 'string'],
 #                ['Project\nName','self.name', 'string'],

Index: PanGalactic/pangalactic/enterprise/ontoclass.py
diff -u PanGalactic/pangalactic/enterprise/ontoclass.py:1.2 PanGalactic/pangalactic/enterprise/ontoclass.py:1.3
--- PanGalactic/pangalactic/enterprise/ontoclass.py:1.2	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/ontoclass.py	Fri Apr 16 14:32:57 2004
@@ -1,10 +1,10 @@
-# $Id: ontoclass.py,v 1.2 2004/04/14 20:48:26 pbear Exp $
+# $Id: ontoclass.py,v 1.3 2004/04/16 18:32:57 pbear Exp $
 
 """
 A synonym for the ontology "Class" concept.
 """
 
-__version__ = "$Revision: 1.2 $"[11:-2]
+__version__ = "$Revision: 1.3 $"[11:-2]
 
 from pangalactic.enterprise.project import Project
 from pangalactic.enterprise.versionedobject import VersionedObject
@@ -13,9 +13,6 @@
     """
     A synonym for the ontology "Class" concept.
     """
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     # These are fields that are excluded from copying or
     # comparisions between ProductMaster Objects
     _excluded_fields = ['create_datetime', 'pger_create_datetime', 'pgef_oid']
@@ -25,9 +22,6 @@
     _fk = {
            '_project' : 'project_oid'
           }
-#    _gridmap = [ 
-#                 ['Name', 'self.id', 'string']
-#               ]
     _schema_ext = {}
     _schema = _schema_ext.copy()
     _schema.update(VersionedObject._schema)

Index: PanGalactic/pangalactic/utils/configuregrid.py
diff -u PanGalactic/pangalactic/utils/configuregrid.py:1.4 PanGalactic/pangalactic/utils/configuregrid.py:1.5
--- PanGalactic/pangalactic/utils/configuregrid.py:1.4	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/utils/configuregrid.py	Fri Apr 16 14:32:58 2004
@@ -64,7 +64,7 @@
             
     def CreateAttributeList(self):
         """Creates the list of all available attribute names in the entire collection"""
-        print "configgrid.createattributelist", self.collection_name
+        #print "configgrid.createattributelist", self.collection_name
         temp = {}
         collection = self.localDB.getDict(self.collection_name)
         for obj_id, obj in collection.items():
@@ -92,7 +92,7 @@
             #loop through the list and set the item as selected in the available listctrl
             availwgt = self.GetAvailableWgt()
             shownwgt = self.GetShownWgt()
-            for attrname, dispname in selections:
+            for attrname, dispname, atype in selections:
                 ndx = availwgt.FindItem(-1, attrname)
                 availwgt.SetItemState (ndx, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
 
@@ -100,7 +100,7 @@
                 self.MoveSelections(availwgt, shownwgt)
 
             #once again loop the list and put the display name into the grid
-            for attrname, dispname in selections:
+            for attrname, dispname, atype in selections:
                 ndx = shownwgt.FindItem(-1, attrname)
                 self.grid.SetCellValue(ndx, 1, dispname)
         

Index: PanGalactic/pangalactic/enterprise/workflow/wfactivity.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.20 PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.21
--- PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.20	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfactivity.py	Fri Apr 16 14:32:58 2004
@@ -35,6 +35,7 @@
     
     _default_display_types = {}
     
+# leave this here for now.
 #    _defaultgridmap = [["Activity",           "self.fields['activity']",           "string", ""],
 #                       ["Time Frame\n(days)", "self.fields['time frame\n(days)']", "string", ""],
 #                       ["Description",        "self.fields['description']",        "string", ""]]

Index: PanGalactic/pangalactic/enterprise/pgeffile.py
diff -u PanGalactic/pangalactic/enterprise/pgeffile.py:1.19 PanGalactic/pangalactic/enterprise/pgeffile.py:1.20
--- PanGalactic/pangalactic/enterprise/pgeffile.py:1.19	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/pgeffile.py	Fri Apr 16 14:32:57 2004
@@ -1,12 +1,12 @@
-# $Id: pgeffile.py,v 1.19 2004/04/14 20:48:26 pbear Exp $
+# $Id: pgeffile.py,v 1.20 2004/04/16 18:32:57 pbear Exp $
 
 """
 A container for information about a file, including its path.
 
-@version: $Revision: 1.19 $
+@version: $Revision: 1.20 $
 """
 
-__version__ = "$Revision: 1.19 $"[11:-2]
+__version__ = "$Revision: 1.20 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -16,11 +16,7 @@
     """
     _contains = {}
     _contains_methods = {}
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
     _excluded_fields = []
-#    _gridmap = []
     _schema_ext = {
                    'location'        : 'str',
                    'user_file_name'  : 'str',

Index: PanGalactic/pangalactic/client/modules/psm/psmtool.py
diff -u PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.160 PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.161
--- PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.160	Wed Apr 14 16:48:25 2004
+++ PanGalactic/pangalactic/client/modules/psm/psmtool.py	Fri Apr 16 14:32:56 2004
@@ -9,7 +9,7 @@
 This module is the main application code for the pgef client interface
 """
 
-__version__ = "$Revision: 1.160 $"[11:-2]
+__version__ = "$Revision: 1.161 $"[11:-2]
 
 
 import os
@@ -36,7 +36,7 @@
 from pangalactic.enterprise.pgefobject          import PgefObject
 
 from pangalactic.utils import datamanager
-from pangalactic.utils import dbbrowser
+#from pangalactic.utils import dbbrowser
 from pangalactic.utils import objectstatus
 from pangalactic.utils import toolframe
 from pangalactic.utils import preferences
@@ -124,7 +124,6 @@
         self.grid_notebook = wxNotebook(self, -1, wxDefaultPosition, wxSize(200, 200)) 
     
         #Create grid to hold Models
-        print "\nModelGrid"
         self.modelgrid = pgefgrid.PgefGrid(self.grid_notebook, -1,
                                            classname = "Model",
                                            localdb = self.dm.localDB)
@@ -134,7 +133,6 @@
                              # if it initially has a scrollbar
         
         # Create Grid to hold Parts
-        print "\nPartGrid"
         self.itemgrid = pgefgrid.PgefGrid(self.grid_notebook, -1,
                                           classname = "Part",
                                           localdb = self.dm.localDB)

Index: PanGalactic/pangalactic/enterprise/person.py
diff -u PanGalactic/pangalactic/enterprise/person.py:1.16 PanGalactic/pangalactic/enterprise/person.py:1.17
--- PanGalactic/pangalactic/enterprise/person.py:1.16	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/person.py	Fri Apr 16 14:32:57 2004
@@ -1,4 +1,4 @@
-# $Id: person.py,v 1.16 2004/04/14 20:48:26 pbear Exp $
+# $Id: person.py,v 1.17 2004/04/16 18:32:57 pbear Exp $
 
 """
 A human being.
@@ -13,11 +13,7 @@
     A human being (who may or may not be a PGEF application
     user).
     """
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
     _excluded_fields = []
-#    _gridmap = []
     _properties = PgefObject._properties.copy()
     _required = ['id',
                  'fname',

Index: PanGalactic/pangalactic/utils/basegrid.py
diff -u PanGalactic/pangalactic/utils/basegrid.py:1.20 PanGalactic/pangalactic/utils/basegrid.py:1.21
--- PanGalactic/pangalactic/utils/basegrid.py:1.20	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/utils/basegrid.py	Fri Apr 16 14:32:58 2004
@@ -41,7 +41,8 @@
     grid columns and to fill a row of data given the data in a list format"""
     def __init__(self, parent, id, classname = None, localdb = None, intable = None):
         wxGrid.__init__(self, parent, id)
-        self.SetColLabelSize(48)
+        #single row column labels + extra for larger font
+        self.SetColLabelSize(30)
         self.AutoSizeColumns(True)
 
         self.localDB = localdb

Index: PanGalactic/pangalactic/enterprise/model.py
diff -u PanGalactic/pangalactic/enterprise/model.py:1.6 PanGalactic/pangalactic/enterprise/model.py:1.7
--- PanGalactic/pangalactic/enterprise/model.py:1.6	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/model.py	Fri Apr 16 14:32:57 2004
@@ -1,12 +1,12 @@
-# $Id: model.py,v 1.6 2004/04/14 20:48:26 pbear Exp $
+# $Id: model.py,v 1.7 2004/04/16 18:32:57 pbear Exp $
 
 """
 A representation or specification of a thing.
 
-@version: $Revision: 1.6 $
+@version: $Revision: 1.7 $
 """
 
-__version__ = "$Revision: 1.6 $"[11:-2]
+__version__ = "$Revision: 1.7 $"[11:-2]
 
 from pangalactic.enterprise.project import Project
 from pangalactic.enterprise.versionedobject import VersionedObject
@@ -33,11 +33,13 @@
     _fk.update(_fk_ext)
 
     # These are the fields that will appear in when an item is
-    # placed in a grid.  The format for each field is [ Label,
-    # attribute, field_type ].
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
+    # placed in a grid.
+    _default_display_order = ["id", "name", "short_description", "owner_oid"]
+    _default_display_names = {"id": "Model",
+                              "name": "Model Name Code",
+                              "short_description": "Model Name",
+                              "owner_oid": "Model Owner"}
+    _default_display_types = {}
 #    _gridmap = [
 #                ['Part\nNumber', 'self._of_part.id', 'string'],
 #                ['Model', 'self.id', 'string'],

Index: PanGalactic/pangalactic/enterprise/property.py
diff -u PanGalactic/pangalactic/enterprise/property.py:1.8 PanGalactic/pangalactic/enterprise/property.py:1.9
--- PanGalactic/pangalactic/enterprise/property.py:1.8	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/property.py	Fri Apr 16 14:32:58 2004
@@ -1,4 +1,4 @@
-# $Id: property.py,v 1.8 2004/04/14 20:48:26 pbear Exp $
+# $Id: property.py,v 1.9 2004/04/16 18:32:58 pbear Exp $
 
 """
 An attribute whose definition can be managed.
@@ -20,9 +20,6 @@
     # TODO: add attributes used in IEC 61360 and RosettaNet
     # dictionaries
 
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
     # pgef_oid, create_datetime, and mod_datetime are excluded
     # fields because they receive non-null default values at
     # initialization time.
@@ -33,10 +30,8 @@
                        ]
     _excluded_dump = []
     _fk = {}
-#    _gridmap = [ ['ID', 'self.id'],
-#                 ['Context' , 'self.id_context'],
-#                 ['Name' , 'self.name'],
-#                 ['Definition' , 'self.long_description'] ]
+    _default_display_order = ["id", "id_context", "name", "long_description"]
+    _default_display_names = {"id": "ID", "id_context": "Context", "name": "Name", "long_description": "Definition"}
     _properties = {}
     _required = []
     _refs = {}

Index: PanGalactic/pangalactic/enterprise/part.py
diff -u PanGalactic/pangalactic/enterprise/part.py:1.5 PanGalactic/pangalactic/enterprise/part.py:1.6
--- PanGalactic/pangalactic/enterprise/part.py:1.5	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/part.py	Fri Apr 16 14:32:57 2004
@@ -1,10 +1,10 @@
-# $Id: part.py,v 1.5 2004/04/14 20:48:26 pbear Exp $
+# $Id: part.py,v 1.6 2004/04/16 18:32:57 pbear Exp $
 
 """
 A product or some specifiable thing.
 """
 
-__version__ = "$Revision: 1.5 $"[11:-2]
+__version__ = "$Revision: 1.6 $"[11:-2]
 
 from pangalactic.enterprise.project import Project
 from pangalactic.enterprise.versionedobject import VersionedObject
@@ -15,24 +15,22 @@
     or description of a product or some specifiable thing.  I may
     be versioned.
     """
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     # These are fields that are excluded from copying or
     # comparisions between Part objects
     _excluded_fields = ['create_datetime', 'pger_create_datetime', 'pgef_oid']
     _excluded_dump = ['Mark', 'Drag']
     # These are the fields that will appear in when an item is placed in a grid.
     # The format for each field is [ Label, attribute, field_type ].
+    _default_display_order = ["id", "name", "owner_oid", "short_description", "create_datetime", "creator_oid"]
+    _default_display_names = {"id": "Part Number",
+                              "name": "Name Code",
+                              "owner_oid": "POC",
+                              "short_description": "Name",
+                              "create_datetime": "Created",
+                              "creator_oid": "Creator"}
+    _default_display_types = {}
+
     _fk = VersionedObject._fk.copy()
-#    _gridmap = [
-#                ['Part\nNumber','self.id', 'string'],
-#                ['Name\nCode','self.name', 'string'],
-#                ['POC','self.owner_oid', 'string'],
-#                ['Name','self.short_description', 'string'],
-#                ['Created','self.create_datetime', 'string'],
-#                ['Creator','self.creator_oid', 'string']
-#               ]
     _refs = VersionedObject._refs.copy()
     # _required specifies the minimum fields
     _required = [

Index: PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py:1.31 PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py:1.32
--- PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py:1.31	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfprocessoverview.py	Fri Apr 16 14:32:58 2004
@@ -111,7 +111,6 @@
                                  classname = "WfProcess",
                                  localdb = self.dm.localDB,
                                  intable = self.gridtable)
-        self.grid.SetColLabelSize(22)
         self.grid.SetSize(self.parent.GetClientSize())
         self.FillGrid(datalist)
         
@@ -170,7 +169,7 @@
 
 
     def OnWorkflowWizard(self, event = None):
-        print "wfpo.onworkflowwizard"
+        #print "wfpo.onworkflowwizard"
 
         tmpsize = wxSize(750, 600)
         htext = "This is where you create a Workflow Template.\n\n" + \
@@ -255,7 +254,7 @@
 
     def OnWorkflowEdit(self, event):
         # popup the editor, initialized with the selected workflow from the grid
-        print "wfpo.onworkflowedit"
+        #print "wfpo.onworkflowedit"
 
         wfobj = self.grid.getObject(self.grid.SelectedRow)
         wfeditframe = self.findWorkflowFrame(wfobj, "edit")

Index: PanGalactic/pangalactic/enterprise/dcu.py
diff -u PanGalactic/pangalactic/enterprise/dcu.py:1.9 PanGalactic/pangalactic/enterprise/dcu.py:1.10
--- PanGalactic/pangalactic/enterprise/dcu.py:1.9	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/dcu.py	Fri Apr 16 14:32:57 2004
@@ -1,4 +1,4 @@
-# $Id: dcu.py,v 1.9 2004/04/14 20:48:26 pbear Exp $
+# $Id: dcu.py,v 1.10 2004/04/16 18:32:57 pbear Exp $
 
 """
 Document Component Usage (DCU)
@@ -7,10 +7,10 @@
 I{component}) and another Document (the I{assembly}) in which it
 occurs as a part.
 
-@version: $Revision: 1.9 $
+@version: $Revision: 1.10 $
 """
 
-__version__ = "$Revision: 1.9 $"[11:-2]
+__version__ = "$Revision: 1.10 $"[11:-2]
 
 from pangalactic.enterprise.document import Document
 from pangalactic.enterprise.pgefobject import PgefObject
@@ -23,16 +23,13 @@
     I{component}) and another Document (the I{assembly}) in which
     it occurs as a part.
     """
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     # _excluded_fields are those inherited from PgefObject
     _fk = {
            '_assembly' :  'assembly_oid',
            '_component' : 'component_oid'
           }
     _excluded_dump = []
-#    _gridmap = []
+
     _pk = ['pgef_oid']
     _properties = PgefObject._properties.copy()
     _refs = {'_assembly'  : 'Document',

Index: PanGalactic/pangalactic/enterprise/role.py
diff -u PanGalactic/pangalactic/enterprise/role.py:1.8 PanGalactic/pangalactic/enterprise/role.py:1.9
--- PanGalactic/pangalactic/enterprise/role.py:1.8	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/role.py	Fri Apr 16 14:32:58 2004
@@ -1,10 +1,10 @@
-# $Id: role.py,v 1.8 2004/04/14 20:48:26 pbear Exp $
+# $Id: role.py,v 1.9 2004/04/16 18:32:58 pbear Exp $
 
 """
 An set of user privileges for a PGEF application.
 """
 
-__version__ = "$Revision: 1.8 $"[11:-2]
+__version__ = "$Revision: 1.9 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -12,9 +12,6 @@
     """
     A set of user privileges for a PGEF application.
     """
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     # pgef_oid, create_datetime, and mod_datetime are excluded
     # fields because they receive non-null default values at
     # initialization time.
@@ -25,10 +22,7 @@
                        ]
     _excluded_dump = []
     _fk = {}
-#    _gridmap = [ ['UserID', 'self.UserID', 'string'],
-#                 ['Role Code' , 'self.RollCode', 'string'],
-#                 ['Project Name\nCode', 'self.project', 'string']
-#               ]
+
     _properties = {}
     _required = []
     _refs = {}

Index: PanGalactic/pangalactic/utils/configuredisplay.py
diff -u PanGalactic/pangalactic/utils/configuredisplay.py:1.10 PanGalactic/pangalactic/utils/configuredisplay.py:1.11
--- PanGalactic/pangalactic/utils/configuredisplay.py:1.10	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/utils/configuredisplay.py	Fri Apr 16 14:32:58 2004
@@ -23,6 +23,7 @@
 
         CustomizeFunc(self, true)
         self.grid = self.GetGridWgt()
+        self.grid.SetColLabelSize(30)
         wxColumnSorterMixin.__init__(self, 1)
         
         EVT_BUTTON(self, ID_BITMAPBUTTON_UP, self.OnMoveUp)
@@ -243,6 +244,7 @@
 
 
     def OnOK(self, event):
+        print "configuredisplay.ok"
         event.Skip()
 #        #self.SaveConfig()
 #        #self.Parent.SetReturnCode(wxID_OK)

Index: PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py
diff -u PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py:1.15 PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py:1.16
--- PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py:1.15	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/enterprise/workflow/workflowgrid.py	Fri Apr 16 14:32:58 2004
@@ -77,8 +77,6 @@
         
         self.EnableEditing(false)
 
-        self.SetColLabelSize(32)
-
         EVT_GRID_CELL_LEFT_CLICK(self, self.OnLeftClick)
 
 #        print "wfgrid.table.displaymapping", self.table.GetDisplayMapping()

Index: PanGalactic/pangalactic/enterprise/organization.py
diff -u PanGalactic/pangalactic/enterprise/organization.py:1.15 PanGalactic/pangalactic/enterprise/organization.py:1.16
--- PanGalactic/pangalactic/enterprise/organization.py:1.15	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/organization.py	Fri Apr 16 14:32:57 2004
@@ -1,4 +1,4 @@
-# $Id: organization.py,v 1.15 2004/04/14 20:48:26 pbear Exp $
+# $Id: organization.py,v 1.16 2004/04/16 18:32:57 pbear Exp $
 
 """
 A business entity comprised of personnel and other resources.
@@ -12,16 +12,14 @@
     I encapsulate all information needed by PGEF about an
     organization.
     """
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     # _excluded_fields are those inherited from PgefObject
-#    _gridmap = [
-#                ['ID', 'self.id'],
-#                ['Name' , 'self.Name'], # ideally, name code ...
-#                ['City' , 'self.city'],
-#                ['State' , 'self.state_or_country']
-#               ]
+    _default_display_order = ["id", "name", "city", "state_or_country"]
+    _default_display_names = {"id": "ID",
+                              "name": "Name",
+                              "city": "City",
+                              "State": "state_or_country"}
+    _default_display_types = {}
+
     _required = ['Creator',
                  'Identifier',
                  'Type']

Index: PanGalactic/pangalactic/enterprise/pgefobject.py
diff -u PanGalactic/pangalactic/enterprise/pgefobject.py:1.50 PanGalactic/pangalactic/enterprise/pgefobject.py:1.51
--- PanGalactic/pangalactic/enterprise/pgefobject.py:1.50	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/pgefobject.py	Fri Apr 16 14:32:57 2004
@@ -1,9 +1,9 @@
-# $Id: pgefobject.py,v 1.50 2004/04/14 20:48:26 pbear Exp $
+# $Id: pgefobject.py,v 1.51 2004/04/16 18:32:57 pbear Exp $
 
 """
 The Mother of all PGEF Enterprise Classes.
 
-@version: $Revision: 1.50 $
+@version: $Revision: 1.51 $
 """
 
 # TODO:
@@ -23,7 +23,7 @@
 #             - checks for required fields
 #               
 
-__version__ = "$Revision: 1.50 $"[11:-2]
+__version__ = "$Revision: 1.51 $"[11:-2]
 
 import types
 import string
@@ -89,15 +89,6 @@
     @type _fk:  dictionary
     @cvar _fk:  each attribute in _refs mapped to its foreign key
 
-#    @type _gridmap:  list of lists
-#    @cvar _gridmap:  defines which attributes are to be displayed
-#                    when the object is presented in a grid, in
-#                    what order, with what display names, and what
-#                    column types.  The following shows the
-#                    general format for a standard object:
-#
-#                       - C{_gridmap = [ [display_name, attr_name, type], ...]}
-
     @type _properties:  dictionary
     @cvar _properties:  the names and types of all attributes
                     that are computed as Python properties and
@@ -130,8 +121,6 @@
                     relationship tables and foreign key
                     constraint names)
     """
-    _display_order = []
-    _display_names = {}
     _default_display_order = []
     _default_display_names = {}
     _default_display_types = {}
@@ -146,7 +135,6 @@
                        ]
     _excluded_dump = []
     _fk = {}
-#    _gridmap = []
     _properties = {}
     _required = []
     _refs = {}
@@ -253,7 +241,6 @@
         if not self._default_display_order:
             labels.sort(compareSequence1)
             self._default_display_order = [label[0] for label in labels]
-#            print "order", self._default_display_order
             
         if not self._default_display_types:
             attr_types = [(attr_name, "string") for attr_name in attr_names]
@@ -262,7 +249,6 @@
                 obj = self.__dict__[attr_name]
                 if isinstance(obj, PgefObject):
                     self._default_display_types[attr_name] = obj.pgef_class
-            #print "types", self._default_display_types
 
         if not dnames:
             dnames = self._default_display_names
@@ -270,7 +256,17 @@
             dorder = self._default_display_order
         if not dtypes:
             dtypes = self._default_display_types
-        return [[dnames.get(x, x), x, dtypes.get(x, 'string')] for x in dorder]
+        return [[x, dnames.get(x, x), dtypes.get(x, 'string')] for x in dorder]
+
+    def getDisplayNames(self):
+        if not self._default_display_names:
+            foo = self.getDisplayMap()
+        return self._default_display_names
+
+    def getDisplayOrder(self):
+        if not self._default_display_order:
+            foo = self.getDisplayMap()
+        return self._default_display_order
 
 
     def set_string_date(self):
@@ -472,7 +468,7 @@
     def convertDataToList(self, FilterForDump=None):
         """
         Convert the internal datamembers to a list, the order of
-        which is determined by the _gridmap.
+        which is determined by the default display order
 
         @type FilterForDump:  any that can eval to a boolean
         @param FilterForDump: if true, datamembers in
@@ -499,58 +495,6 @@
                 traceback.print_exc()
         return datalist
 
-# old way        
-##        datalist = []
-##        #print "self.gridmap", self.gridmap
-##        #print "self.excludeddump", self.ExcludedDump
-##        for data in self._gridmap:
-##            if FilterForDump:
-##                if data[0] in self._excluded_dump:
-##                    continue
-##            #datalist.append(data[1])  # old way
-            
-##            #print "appending", data[1]
-##            if len(data[1]) == 0:
-##                # this should take care of the mark and drag
-##                # columns in the grid
-##                datalist.append("")
-##            else:
-##                try:
-##                    #foo = eval(data[1])
-##                    #print foo
-##                    tmpname = data[1].replace("self.", "")
-##                    tmp = getattr(self, tmpname)
-##                    if callable(tmp):
-##                        datalist.append(tmp())
-##                    else:
-##                        datalist.append(eval(data[1]))
-
-##                except Exception:
-##                    print "error in eval of", data[1]
-##                    import traceback
-##                    traceback.print_exc()
-###                    datalist.append("")
-##            #print "appended", data[1]
-##        return datalist
-
-#old old way
-##        tmp = []
-##        print "datalist", datalist
-##        for dataitem in datalist:
-##            print "dataitem", "<" + dataitem + ">"
-##            if len(dataitem) == 0:
-##                # this should take care of the mark and drag
-##                # columns in the grid
-##                tmp.append("")
-##            else:
-##                try:
-##                    tmp.append(eval(dataitem))
-##                except Exception, e:
-##                    print "error in eval of", dataitem
-##                    import traceback
-##                    traceback.print_exc()
-###                    tmp.append("")
-##        return tmp
  
     def DataMemberNames(self, FilterForDump=None):
         """
@@ -569,14 +513,6 @@
             datanames.append(heading)
         return datanames
 
-#old way        
-##        #return [heading[0] for heading in self.gridmap]
-##        for heading in self._gridmap:
-##            if FilterForDump:
-##                if heading[0] in self._excluded_dump:
-##                    continue
-##            datanames.append(heading[0])
-##        return datanames
     
     def DataNames(self):
         """

Index: PanGalactic/pangalactic/utils/pgefdatatable.py
diff -u PanGalactic/pangalactic/utils/pgefdatatable.py:1.8 PanGalactic/pangalactic/utils/pgefdatatable.py:1.9
--- PanGalactic/pangalactic/utils/pgefdatatable.py:1.8	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/utils/pgefdatatable.py	Fri Apr 16 14:32:59 2004
@@ -34,7 +34,6 @@
         cid = self.identifiers[col]
         if cid.find(".") != -1:
             attrs = cid.split(".")
-#            for attr in attrs:
             retval = getattr(self._data[row], attrs[1])
         else:
             retval = getattr(self._data[row], cid)
@@ -45,7 +44,6 @@
         oid = self.identifiers[col]
         if oid.find(".") != -1:
             attrs = oid.split(".")
-#            for attr in attrs:
             retval = getattr(self._data[row], attrs[1])
         else:
             retval = getattr(self._data[row], oid)
@@ -60,18 +58,6 @@
     def GetColLabelValue(self, col):
         # Called when the grid needs to display column labels
         if self._data:
-#            if self.display_map:
-#                return self.display_map[col][1]
-            #    retval = self.display_map[col][1]
-            #    if retval == "":
-            #        retval = self.display_map[col][0]
-            #    elif retval == None:
-            #        retval = " "
-            #else:
-            #    retval = self.identifiers[col]
-            #    if retval == None:
-            #        retval = " "
-            #return retval
             return self._data[0]._default_display_names[self._data[0]._default_display_order[col]]
         return "N/A"
 
@@ -95,18 +81,6 @@
                 self.identifiers.insert(insertpoint, old)
                 self.display_map.insert(insertpoint, old_mapping)
 
-##            old_mapping = self.display_map[frm]
-##            del self.display_map[frm]
-
-##            if to > frm:
-##                insertpoint = to - 1
-##                self.identifiers.insert(insertpoint, old)
-##                self.display_map.insert(insertpoint, old_mapping)
-##            else:
-##                insertpoint = to
-##                self.identifiers.insert(insertpoint, old)
-##                self.display_map.insert(insertpoint, old_mapping)
-
             # Notify the grid
             grid.BeginBatch()
             msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_DELETED, frm, 1)
@@ -143,14 +117,7 @@
         print "pgefdatatable.setdisplaymap"
         self.identifiers = self._data[0]._default_display_order
         self.display_map = self._data[0]._default_display_names
-#        if mapping:
-#            self.display_map = mapping
-#            self.identifiers = [entry[0] for entry in self.display_map]
-#        elif self._data:
-#            self.identifiers = self._data[0]._default_display_order
-#            self.display_map = self._data[0]._default_display_names
-##            self.identifiers = [z[1].replace("self.","") for z in self._data[0]._gridmap]
-##            self.display_map = [(z[1].replace("self.",""), z[0]) for z in self._data[0]._gridmap]
+
 
     def DeleteObject(self, ndx):
         if ndx:       

Index: PanGalactic/pangalactic/utils/mappinggrid.py
diff -u PanGalactic/pangalactic/utils/mappinggrid.py:1.8 PanGalactic/pangalactic/utils/mappinggrid.py:1.9
--- PanGalactic/pangalactic/utils/mappinggrid.py:1.8	Fri Mar  5 16:18:15 2004
+++ PanGalactic/pangalactic/utils/mappinggrid.py	Fri Apr 16 14:32:59 2004
@@ -25,6 +25,7 @@
         self.MapGrid.SetRowLabelSize(40)
         self.MapGrid.SetColLabelValue(self.RightCol, rightinfo[0])
         self.MapGrid.SetColLabelValue(self.LeftCol, leftinfo[0])
+        self.MapGrid.SetColLabelSize(30)
         self.MapGrid.EnableEditing(true)
 
         self.MoveTo = None

Index: PanGalactic/pangalactic/utils/datamanager.py
diff -u PanGalactic/pangalactic/utils/datamanager.py:1.95 PanGalactic/pangalactic/utils/datamanager.py:1.96
--- PanGalactic/pangalactic/utils/datamanager.py:1.95	Wed Apr  7 16:11:38 2004
+++ PanGalactic/pangalactic/utils/datamanager.py	Fri Apr 16 14:32:58 2004
@@ -1,6 +1,6 @@
 # $Source: /repo/step_testbed/PanGalactic/pangalactic/utils/datamanager.py,v $
 
-__version__ = "$Revision: 1.95 $"[11:-2]
+__version__ = "$Revision: 1.96 $"[11:-2]
 
 
 import time
@@ -380,7 +380,7 @@
             
 
     def add(self, addlist):
-        self.localDB.Add(addlist)
+        self.localDB.add(addlist)
 
 
     def save(self, savelist):
@@ -909,25 +909,148 @@
         #print "datamanager.initiated", activity.getName()
         wfobj = self.localDB.getLookupObject(parent_process_id)
         print "notify the ptbs that " + wfobj.wfdata.id + " is at " + \
-              activity.getName() + " stage in " + wfobj.name
+              activity.getName() + " stage in " + wfobj.name[0:3]
 
 
     def draftActivity(self, parent_process_id, activity):
         #print "datamanager.draft", activity.getName()
         wfobj = self.localDB.getLookupObject(parent_process_id)
         print "notify the ptbs that " + wfobj.wfdata.id + " is at " + \
-              activity.getName() + " stage in " + wfobj.name
+              activity.getName() + " stage in " + wfobj.name[0:3]
 
 
     def approvedActivity(self, parent_process_id, activity):
         #print "datamanager.approved", activity.getName()
         wfobj = self.localDB.getLookupObject(parent_process_id)
         print "notify the ptbs that " + wfobj.wfdata.id + " is at " + \
-              activity.getName() + " stage in " + wfobj.name
+              activity.getName() + " stage in " + wfobj.name[0:3]
 
 
     def releasedActivity(self, parent_process_id, activity):
         #print "datamanager.released", activity.getName()
         wfobj = self.localDB.getLookupObject(parent_process_id)
         print "notify the ptbs that " + wfobj.wfdata.id + " is at " + \
-              activity.getName() + " stage in " + wfobj.name
+              activity.getName() + " stage in " + wfobj.name[0:3]
+
+
+
+    def getCategories(self, context):
+#        print "datamanager.getcategories"
+        objlist = self.localDB.getCategories(context)
+        if not objlist:
+            if self.user._loggedin:
+                objlist = self.server.getCategories(context)
+                self.localDB.saveCategories(context, objlist)
+        return objlist
+
+
+
+    def uncommittedAlerts(self):
+        #print "uncommittedalerts"
+
+        uncommobjs = self.localDB.getUncommittedAlerts()
+        objlen = len(uncommobjs)
+        if objlen > 0:
+            for obj in uncommobjs:
+#                print "obj", obj.id
+                if isinstance(obj, PgefAdvisory):
+#                    print "true"
+                    return True
+#            print "false1"
+            return False
+        else:
+#            print "false2"
+            return False
+
+
+    def getAlertsByCoordinator(self, userid):
+        print "datamanager.getalertsbycoordinator : tbd"
+        alertlist = []
+        return alertlist
+        
+
+    def commitAlerts(self, unsavedobjs, upload = True):
+        print "datamanager.commitalerts"
+        alertaddlist = []
+        alertdellist = []
+
+        timetuple = mx.DateTime.now()
+        newtime = timetuple.strftime("%m/%d/%Y %H:%M:%S")
+        retval = None
+
+        if self.user._loggedin:
+            if len(unsavedobjs) > 0:
+                for obj in unsavedobjs:
+                    # check for unset attributes and commit-related stuff
+
+                    # it will be switched to a string by cook()
+                    # obj._due_datetime = obj._due_date  ## switch it to string prior to commit
+
+                    obj.creator = self.user.id
+                    #if obj.owner == "":
+                    #    obj.owner = obj.creator
+
+#                    if obj.project == "":                       #???  can we take these
+#                        obj.project_id = self.CurrentProject.id #???  two lines out??? 
+
+                    if obj.state == objectstatus.DELETE:
+                        #obj.mod_datetime = newtime
+                        alertdellist.append(obj)
+
+                    elif obj.state == objectstatus.MODIFY:
+                        #obj.mod_datetime = newtime
+                        alertaddlist.append(obj)
+
+                    elif obj.state == objectstatus.ADD:
+                        alertaddlist.append(obj)
+
+                actionlist = []
+
+                if len(alertaddlist) > 0:
+                    retval = self.server.addObjects(alertaddlist)
+                    if retval:
+                        print "alert add succeeded"
+                        for obj in alertaddlist:
+                            obj.state = None
+                            #obj.pger_create_datetime = retval
+                            #obj.pger_mod_datetime = retval
+                            actionlist.append(obj)
+
+                            if upload:
+                                print "found an alert, uploading", obj._upload_file_name
+                                if os.path.exists(obj._upload_file_name):
+                                    print "found alert file to upload", obj._upload_file_name
+                                    print "upload tbd"
+                                else:
+                                    print "no alert file"
+                    else:
+                        print "commit alerts failed"
+
+                if len(alertdellist) > 0:
+                    pass
+                    #tbd
+                    #retval = self.server.CallServerFunction(dellist, "DelObjects", self.auth)
+                    #log.debug("retval: <%s>" % retval)
+
+                    #if retval:
+                        ## print "del failed"
+                        #log.error("Commit to database failed - DelObjects")
+                        #for obj in dellist:
+                            #obj.state = None
+                            #obj.pger_create_datetime = retval
+                            #obj.pger_mod_datetime = retval
+                            #actionlist.append(obj)
+                    #else:
+                    #    print "del succeeded"
+
+                # reset the status flags for the committed objects
+                self.localDB.Save(actionlist, override = True)
+                self.localDB.ClearUncommittedObjects(actionlist)
+        else:
+            self.localDB.Add(unsavedobjs)
+
+        self.Refresh = False
+        if retval:
+            return retval
+        else:
+            return newtime

Index: PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py:1.10 PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py:1.11
--- PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py:1.10	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfdatatable.py	Fri Apr 16 14:32:58 2004
@@ -32,59 +32,11 @@
         # self._data = []            ## list of data objects, 1 per row
         # self.display_map = []      ## list of tuples : (attribute name, column label), 1 per column
         self._datadict = {}
-#        self._UseDefaultMapping = false
-
-
-##    def SetDefaultMapping(self):
-##        print "wfdatatable.setdefaultmapping"
-##        if self._data:
-##            #self.identifiers = [z[1].replace('self.','') for z in self._data[0]._defaultgridmap]
-##            #self.display_map = [(z[1].replace('self.',''), z[0]) for z in self._data[0]._defaultgridmap]
-##            self.identifiers = self._data[0]._default_display_order
-##            self.display_map = self._data[0]._default_display_names
-##            self._UseDefaultMapping = true
 
              
     def GetDisplayMapping(self):
         return self.display_map
 
-##    def IsEmptyCell(self, row, col):
-##        retval = None
-##        tmpid = self.identifiers[col]
-##        tmp = getattr(self._data[row], tmpid)
-##        if callable(tmp):
-##            retval = tmp()
-##        else:
-##            if tmpid.find(".") <> -1:
-##                attrs = tmpid.split(".")
-##                for attr in attrs:
-##                    retval = self._data[row].__dict__[attr]
-##            else:
-##                retval = self._data[row].__dict__[tmpid]
-
-##        return not retval
-        
-
-##    def GetValue(self, row, col):
-##        retval = None
-###        print "getvalues.identifiers", self.identifiers
-##        tmpid = self.identifiers[col]
-###        print "getvalue", row, col, tmpid
-###        print "getvalue.tmpid", tmpid
-###        print "data[row]", self._data[row]
-##        tmp = getattr(self._data[row], tmpid)
-##        if callable(tmp):
-##            retval = tmp()
-##        else:
-##            if tmpid.find(".") <> -1:
-##                attrs = tmpid.split(".")
-##                for attr in attrs:
-##                    retval = self._data[row].__dict__[attr]
-##            else:
-##                retval = self._data[row].__dict__[tmpid]
-
-##        return retval
-
 
     def SetValue(self, row, col, value):
         pass
@@ -93,18 +45,6 @@
     def GetColLabelValue(self, col):
         # Called when the grid needs to display column labels
         if self._data:
-#            if self.display_map:
-#                return self.display_map[col][1]
-            #    retval = self.display_map[col][1]
-            #    if retval == "":
-            #        retval = self.display_map[col][0]
-            #    elif retval == None:
-            #        retval = " "
-            #else:
-            #    retval = self.identifiers[col]
-            #    if retval == None:
-            #        retval = " "
-            #return retval
             if self._data[0].wfdata:
                 return self._data[0]._instance_display_names[self._data[0]._instance_display_order[col]]
             else:
@@ -112,88 +52,6 @@
         return "N/A"
 
 
-##    def GetColLabelValue(self, col):
-##        retval = None
-##        if self._data:
-##            if self.display_map:
-##                retval = self.display_map[col][1]
-##                if retval == "":
-##                    retval = self.display_map[col][0]
-##                elif retval == None:
-##                    retval = " "
-##            else:
-##                retval = self.identifiers[col]
-##                if retval == None:
-##                    retval = " "
-##            return retval
-
-#    def setDisplayMap(self):
-#        print "wfdatatable.setdisplaymap"
-#        self.identifiers = self._data[0]._default_display_order
-#        self.display_map = self._data[0]._default_display_names
-#        self.identifiers = [z[1].replace("self.", "") for z in gridmap]
-#        self.display_map = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
-#        print "wftable.display_mapping", self.display_map
-        
-
-#    def SetDisplayMapping(self, mapping):
-#        print "wfdatatable.setdisplaymapping", mapping
-#        if mapping:
-#            self.display_map = mapping
-#            self.identifiers = [entry[0] for entry in self.display_map]
-#
-#        elif self._data:
-#            self.identifiers = self._data[0]._default_display_order
-#            self.display_map = self._data[0]._default_display_names
-##            if self._UseDefaultMapping:
-##                gridmap = self._data[0]._defaultgridmap
-##            else:
-##                gridmap = self._data[0]._gridmap
-##            self.identifiers = [z[1].replace("self.", "") for z in gridmap]
-##            self.display_map = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
-
-            
-##    def AddData(self, new_obj):
-##        if isinstance(new_obj, ListType):
-##            num_rows = len(new_obj)
-##            if num_rows == 0:
-##                return
-            
-##            for obj in new_obj:
-##                self._data.append(obj)
-##                self._datadict[obj.pgef_oid] = len(self._data) - 1
-##        else:
-##            num_rows = 1
-##            self._data.append(new_obj)
-##            self._datadict[new_obj.pgef_oid] = len(self._data) - 1
-
-##        if self._UseDefaultMapping:
-##            self.identifiers = self._data[0]._default_display_order
-##            self.display_map = self._data[0]._default_display_names
-###            gridmap = self._data[0]._defaultgridmap
-###            self.display_map = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
-###            self.identifiers = [entry[0] for entry in self.display_map]
-##            msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_APPENDED, len(self.identifiers))
-##            self.GetView().ProcessTableMessage(msg)
-
-##        else:
-##            if not self.display_map:
-##                self.display_map = self._data[0]._default_display_names
-###                gridmap = self._data[0]._gridmap
-###                self.display_map = [(z[1].replace("self.", ""), z[0]) for z in gridmap]
-
-##            if not self.identifiers:
-##                self.identifiers = [entry[0] for entry in self.display_map]
-
-##                msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_COLS_APPENDED, len(self.identifiers))
-##                self.GetView().ProcessTableMessage(msg)
-
-##        #print "adddata.mapping", self.display_map
-##        msg = wxGridTableMessage(self, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, num_rows)
-##        self.GetView().ProcessTableMessage(msg)
-##        msg = wxGridTableMessage(self, wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)
-##        self.GetView().ProcessTableMessage(msg)
-            
 
     def AddData(self, new_obj):
         if isinstance(new_obj, ListType):
@@ -243,6 +101,3 @@
             msg = wxGridTableMessage(self, wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)
             self.GetView().ProcessTableMessage(msg)
             
-            
-#    def AppendRows(self, numrows):
-#        print "wfdatatable.appendrows"

Index: PanGalactic/pangalactic/utils/xmlrpcinterface.py
diff -u PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.48 PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.49
--- PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.48	Wed Apr  7 12:11:50 2004
+++ PanGalactic/pangalactic/utils/xmlrpcinterface.py	Fri Apr 16 14:32:59 2004
@@ -3,10 +3,10 @@
 """
 PanGalactic Client XML-RPC Interfaces
 
-@version: $Revision: 1.48 $
+@version: $Revision: 1.49 $
 """
 
-__version__ = "$Revision: 1.48 $"[11:-2]
+__version__ = "$Revision: 1.49 $"[11:-2]
 
 import xmlrpclib
 import types
@@ -191,7 +191,7 @@
         @param objs: objects to be hooked up.  Don't worry if you
                      pass an irrelevent object.
         """
-        print "xmlrpc.getobjects"
+        #print "xmlrpc.getobjects"
         # get only the latest version for versioned objects, if requested
         if head_flag:
             if classname in ["Part", "Document", "Model", "OntoClass", "PartsList"]:
@@ -204,8 +204,8 @@
         if data:
             newobjs, objs = self._factory.rememberAll(data, objs)
             return newobjs
-        else:
-            print "no data"
+        #else:
+        #    print "no data"
 
 
     def getCategories(self, context):

Index: PanGalactic/pangalactic/client/tests/test_otherdocform.py
diff -u PanGalactic/pangalactic/client/tests/test_otherdocform.py:1.3 PanGalactic/pangalactic/client/tests/test_otherdocform.py:1.4
--- PanGalactic/pangalactic/client/tests/test_otherdocform.py:1.3	Fri Mar  5 16:18:12 2004
+++ PanGalactic/pangalactic/client/tests/test_otherdocform.py	Fri Apr 16 14:32:57 2004
@@ -1,112 +1,92 @@
 import unittest
-import modules.psm.otherdocform
-import modules.psm.otherdoc_wdr
+import modules.psm.docform
+import modules.psm.docform_wdr
 import pgefstate
 from dataobjects.securitymanager import actions
 from wxPython.wx import *
 
-class TestOtherDocForm(unittest.TestCase):
+class TestDocForm(unittest.TestCase):
     def Title(self):
-        print '\nOtherDocForm suite'
+        print '\nDocForm suite'
         
     def testCreation(self):
         testframe = wxFrame(None, -1, 'Test Frame')
-        testframe.otherdocform = None
+        testframe.docform = None
         testframe.State = pgefstate.PgefState()
-        testframe.otherdocform = modules.psm.otherdocform.OtherDocForm(testframe, -1, testframe.State)
-        assert testframe.otherdocform != None, 'Couldnt create OtherDocForm'
+        testframe.docform = modules.psm.docform.DocForm(testframe, -1, testframe.State)
+        assert testframe.docform != None, 'Couldnt create DocForm'
         
     def testEditingMode(self):
         testframe = wxFrame(None, -1, 'Test Frame')
-        testframe.otherdocform = None
+        testframe.docform = None
         testframe.State = pgefstate.PgefState()
-        testframe.otherdocform = modules.psm.otherdocform.OtherDocForm(testframe, -1, testframe.State)
-        testframe.otherdocform.AllowedActions.append(actions.MODIFYDOCUMENT)
-        testframe.otherdocform.EditingMode()
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_MAKELINK_DOC), "wxButton")
-        assert button.IsEnabled() == false , 'Make link should not be enabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_DELLINK_DOC), "wxButton")
+        testframe.docform = modules.psm.docform.DocForm(testframe, -1, testframe.State)
+        testframe.docform.AllowedActions.append(actions.MODIFYDOCUMENT)
+        testframe.docform.EditingMode()
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DELLINK_DOC_BUTTON), "wxButton")
         assert button.IsEnabled() == false, 'Delete Link should be disabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.OTHERDOC_NEW_BUTTON), "wxButton")
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_NEW_BUTTON), "wxButton")
         assert button.IsEnabled() == false, 'New Doc should be disabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.OTHERDOC_EDIT_BUTTON), "wxButton")
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_EDIT_BUTTON), "wxButton")
         assert button.IsEnabled() == false, 'Edit Doc should be disabled'
-#        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_SAVE_DOC), "wxButton")
-#        assert button.IsEnabled() == true, 'Save should ne enabled'
-#        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_RESET_DOC), "wxButton")
-#        assert button.IsEnabled() == true   
+
         
     def testLinkMode(self):
         testframe = wxFrame(None, -1, 'Test Frame')
-        testframe.otherdocform = None
+        testframe.docform = None
         testframe.State = pgefstate.PgefState()
-        testframe.otherdocform = modules.psm.otherdocform.OtherDocForm(testframe, -1, testframe.State)
-        testframe.otherdocform.AllowedActions.append(actions.ADDDOCUMENT)
-        testframe.otherdocform.LinkMode()
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_MAKELINK_DOC), "wxButton")
-        assert button.IsEnabled() == true, 'Make link should be enabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_DELLINK_DOC), "wxButton")
+        testframe.docform = modules.psm.docform.DocForm(testframe, -1, testframe.State)
+        testframe.docform.AllowedActions.append(actions.ADDDOCUMENT)
+        testframe.docform.LinkMode()
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_DELLINK_BUTTON), "wxButton")
         assert button.IsEnabled() == false, 'Delete Link should be disabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.OTHERDOC_NEW_BUTTON), "wxButton")
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_NEW_BUTTON), "wxButton")
         assert button.IsEnabled() == true, 'New Doc should be enabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.OTHERDOC_EDIT_BUTTON), "wxButton")
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_EDIT_BUTTON), "wxButton")
         assert button.IsEnabled() == true, 'Edit Doc should be enabled'
-#        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_SAVE_DOC), "wxButton")
-#        assert button.IsEnabled() == false, 'Save should be disabled'
-#        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_RESET_DOC), "wxButton")
-#        assert button.IsEnabled() == false, 'Reset should be disabled' 
+
         
     def testRootMode(self):
         testframe = wxFrame(None, -1, 'Test Frame')
-        testframe.otherdocform = None
+        testframe.docform = None
         testframe.State = pgefstate.PgefState()
-        testframe.otherdocform = modules.psm.otherdocform.OtherDocForm(testframe, -1, testframe.State)
-        testframe.otherdocform.AllowedActions.append(actions.ADDDOCUMENT)
-        testframe.otherdocform.RootMode()
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_MAKELINK_DOC), "wxButton")
-        assert button.IsEnabled() == false, 'Make link should be disabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_DELLINK_DOC), "wxButton")
+        testframe.docform = modules.psm.docform.DocForm(testframe, -1, testframe.State)
+        testframe.docform.AllowedActions.append(actions.ADDDOCUMENT)
+        testframe.docform.RootMode()
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_DELLINK_BUTTON), "wxButton")
         assert button.IsEnabled() == false, 'Delete Link should be disabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.OTHERDOC_NEW_BUTTON), "wxButton")
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_NEW_BUTTON), "wxButton")
         assert button.IsEnabled() == true, 'New Doc should be enabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.OTHERDOC_EDIT_BUTTON), "wxButton")
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_EDIT_BUTTON), "wxButton")
         assert button.IsEnabled() == false, 'Edit Doc should be disabled when on root node'
-#        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_SAVE_DOC), "wxButton")
-#        assert button.IsEnabled() == false, 'Save should be disabled'
-#        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_RESET_DOC), "wxButton")
-#        assert button.IsEnabled() == false, 'Reset should be disabled'    
+
         
     def testNodeMode(self):
         testframe = wxFrame(None, -1, 'Test Frame')
-        testframe.otherdocform = None
+        testframe.docform = None
         testframe.State = pgefstate.PgefState()
-        testframe.otherdocform = modules.psm.otherdocform.OtherDocForm(testframe, -1, testframe.State)
-        testframe.otherdocform.AllowedActions = []
-        testframe.otherdocform.AllowedActions.append(actions.DELETEDOCUMENT)
-        testframe.otherdocform.NodeMode()
-        
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_MAKELINK_DOC), "wxButton")
-        assert button.IsEnabled() == false, 'Make link should be disabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_DELLINK_DOC), "wxButton")
+        testframe.docform = modules.psm.docform.DocForm(testframe, -1, testframe.State)
+        testframe.docform.AllowedActions = []
+        testframe.docform.AllowedActions.append(actions.DELETEDOCUMENT)
+        testframe.docform.NodeMode()
+        
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_DELLINK_BUTTON), "wxButton")
         assert button.IsEnabled() == true, 'Delete Link should be enabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.OTHERDOC_NEW_BUTTON), "wxButton")
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_NEW_BUTTON), "wxButton")
         assert button.IsEnabled() == false, 'New Doc should be disabled'
-        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.OTHERDOC_EDIT_BUTTON), "wxButton")
+        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.docform_wdr.DOC_EDIT_BUTTON), "wxButton")
         assert button.IsEnabled() == false, 'Edit Doc should be disabled'
-#        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_SAVE_DOC), "wxButton")
-#        assert button.IsEnabled() == false, 'Save should be disabled'
-#        button = wxPyTypeCast(testframe.FindWindowById(modules.psm.otherdoc_wdr.ID_BUTTON_RESET_DOC), "wxButton")
-#        assert button.IsEnabled() == false, 'Reset should be disabled'     
+
         
 def suite():
-    otherdocform_suite = unittest.TestSuite()
-    otherdocform_suite.addTest(TestOtherDocForm("Title"))
-    otherdocform_suite.addTest(TestOtherDocForm("testCreation"))
-    otherdocform_suite.addTest(TestOtherDocForm("testEditingMode"))
-    otherdocform_suite.addTest(TestOtherDocForm("testLinkMode"))
-    otherdocform_suite.addTest(TestOtherDocForm("testRootMode"))
-    otherdocform_suite.addTest(TestOtherDocForm("testNodeMode"))
-    return otherdocform_suite
+    docform_suite = unittest.TestSuite()
+    docform_suite.addTest(TestDocForm("Title"))
+    docform_suite.addTest(TestDocForm("testCreation"))
+    docform_suite.addTest(TestDocForm("testEditingMode"))
+    docform_suite.addTest(TestDocForm("testLinkMode"))
+    docform_suite.addTest(TestDocForm("testRootMode"))
+    docform_suite.addTest(TestDocForm("testNodeMode"))
+    return docform_suite
 
 
 def main():

Index: PanGalactic/pangalactic/utils/localdb.py
diff -u PanGalactic/pangalactic/utils/localdb.py:1.77 PanGalactic/pangalactic/utils/localdb.py:1.78
--- PanGalactic/pangalactic/utils/localdb.py:1.77	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/utils/localdb.py	Fri Apr 16 14:32:59 2004
@@ -20,6 +20,12 @@
 
 import pangalactic.utils.objectstatus as objectstatus
 
+from nars.enterprise.pgefadvisory import PgefAdvisory
+from nars.enterprise.nasaadvisory import NasaAdvisory
+from nars.enterprise.gidepalert   import GidepAlert
+from nars.enterprise.gidepproblemadvisory import GidepProblemAdvisory
+from nars.enterprise.nasaimpactstatement import NasaImpactStatement
+
 import ZODB
 from ZODB import FileStorage, DB
 from ZODB import *
@@ -35,15 +41,28 @@
 admin = 10
 user = 1
 
+PGEF_CLASSES = ["Project", "Acu", "Part", "Model", "Document", "DocPtRel",
+                "WfActivity", "WfProcess", "WfTransition", "WfEventAudit"]
+NARS_CLASSES = ["PgefAdvisory", "NasaAdvisory",
+                "GidepAlert", "GidepProblemAdvisory", "NasaImpactStatement"]
+EXCLUDE_CLASSES = ["ACUByAssembly", "DisplayConfig", "Passwd", "UncommittedDocumentIDs",
+                   "OidLookup", "State"]
+
+NOTYET_CLASSES = ["UncommittedObjects", "ProjectObjects"]
 
 class LocalStorage:
     
     ACUBYASSEMBLY = "ACUByAssembly"
     ACUDICT = "Acu"
+    CATEGORY = "OntoClass"
     DISPLAY_CONFIG = "DisplayConfig"
     DOCPTREL = "DocPtRel"
     DOCUMENT = "Document"
+    GIDEPALERT = "GidepAlert"
+    GIDEPPROBLEMADVISORY = "GidepProblemAdvisory"
     MODEL = "Model"
+    NASAADVISORY = "NasaAdvisory"
+    NASAIMPACTSTATEMENT = "NasaImpactStatement"
     OIDLOOKUP = "OidLookup"
     ORGANIZATION = "Organization"
     PART = "Part"
@@ -73,7 +92,11 @@
                 (DISPLAY_CONFIG, 1, admin),
                 (DOCPTREL, 1, admin),
                 (DOCUMENT, 1, user), 
+                (GIDEPALERT, 1, user),
+                (GIDEPPROBLEMADVISORY, 1, user),
                 (MODEL, 1, user), 
+                (NASAADVISORY, 1, user),
+                (NASAIMPACTSTATEMENT, 1, user),
                 (OIDLOOKUP, 1, god),
                 (ORGANIZATION, 0, user),
                 (PART, 1, user), 
@@ -94,6 +117,8 @@
                 (WFTRANSITION, 1, user)
                ]
 
+    DictListNames = [x for x, y, z in dictlist]
+
     CommittedDicts = [ACUDICT,
                       DOCPTREL,
                       DOCUMENT,
@@ -623,31 +648,7 @@
         if unsavedlist:
             for obj in unsavedlist:
                 classname = obj.__class__.__name__
-                #print "saving", classname
-                if classname == "Acu":
-                    self.saveItWithLookup(self.ACUDICT, obj, override)
-                    retlist.append(obj)
-
-                elif classname == "PartsList":
-                    self.saveItWithLookup(self.PARTSLIST, obj, override)
-
-                elif isinstance(obj, document.Document):
-                    #print "saving document"
-                    self.saveItWithLookup(self.DOCUMENT, obj, override)
-                        
-                elif isinstance(obj, pgeffile.PgefFile):
-                    self.saveItWithLookup(self.PGEFFILE, obj, override)
-                        
-                elif isinstance(obj, docptrel.DocPtRel):
-                    self.saveItWithLookup(self.DOCPTREL, obj, override)
-                        
-                elif classname == "Part":
-                    self.saveItWithLookup(self.PART, obj, override)
-                        
-                elif classname == "Model":
-                    self.saveItWithLookup(self.MODEL, obj, override)
-                        
-                elif classname == "WfProcess":
+                if classname == "WfProcess":
                     # saving a wfprocess is not typical, hence the specific save method
                     if self.dbroot[self.WFPROCESS].has_key(obj.pgef_oid):
                         if self.dbroot[self.WFPROCESS][obj.pgef_oid].state:
@@ -657,28 +658,86 @@
                             self.SaveWfProcess([obj])
                     else:
                         self.SaveWfProcess([obj])
+                    
+                elif classname == "Acu":
+                    self.saveItWithLookup(self.ACUDICT, obj, override)
+                    retlist.append(obj)
 
-                elif classname == "WfActivity":
-                    self.saveItWithLookup(self.WFACTIVITY, obj, override)
+                elif classname == "Person":
+                    self.saveUser(obj)
 
-                elif classname == "WfEventAudit":
-                    self.saveItWithLookup(self.WFEVENTAUDIT, obj, override)
+                elif classname in self.DictListNames:
+                    self.saveItWithLookup(classname, obj, override)
+                    retlist.append(obj)
+                else:
+                    print "NOTE:", classname, "is not in localdb.dictlist"
+                    
+##                if classname == "Acu":
+##                    self.saveItWithLookup(self.ACUDICT, obj, override)
+##                    retlist.append(obj)
 
-                elif classname == "WfTransition":
-                    self.saveItWithLookup(self.WFTRANSITION, obj, override)
+##                elif classname == "PartsList":
+##                    self.saveItWithLookup(self.PARTSLIST, obj, override)
 
-                elif classname == "Project":
-                    #print "saving a project.  not project objects"
-                    self.saveItWithLookup(self.PROJECT, obj, override)
+##                elif isinstance(obj, document.Document):
+##                    self.saveItWithLookup(self.DOCUMENT, obj, override)
+                        
+##                elif classname == "NasaAdvisory":
+##                    self.saveItWithLookup(self.NASAADVISORY, obj, override)
+                        
+##                elif classname == "GidepAlert":
+##                    self.saveItWithLookup(self.GIDAPALERT, obj, override)
+                        
+##                elif classname == "GidepProblemAdvisory":
+##                    self.saveItWithLookup(self.GIDEPPROBLEMADVISORY, obj, override)
+                        
+##                elif classname == "NasaImpactStatement":
+##                    self.saveItWithLookup(self.NASAIMPACTSTATEMENT, obj, override)
+                        
+##                elif isinstance(obj, pgeffile.PgefFile):
+##                    self.saveItWithLookup(self.PGEFFILE, obj, override)
+                        
+##                elif isinstance(obj, docptrel.DocPtRel):
+##                    self.saveItWithLookup(self.DOCPTREL, obj, override)
+                        
+##                elif classname == "Part":
+##                    self.saveItWithLookup(self.PART, obj, override)
+                        
+##                elif classname == "Model":
+##                    self.saveItWithLookup(self.MODEL, obj, override)
+                        
+##                elif classname == "WfProcess":
+##                    # saving a wfprocess is not typical, hence the specific save method
+##                    if self.dbroot[self.WFPROCESS].has_key(obj.pgef_oid):
+##                        if self.dbroot[self.WFPROCESS][obj.pgef_oid].state:
+##                            if override:
+##                                self.SaveWfProcess([obj])
+##                        else:
+##                            self.SaveWfProcess([obj])
+##                    else:
+##                        self.SaveWfProcess([obj])
+
+##                elif classname == "WfActivity":
+##                    self.saveItWithLookup(self.WFACTIVITY, obj, override)
+
+##                elif classname == "WfEventAudit":
+##                    self.saveItWithLookup(self.WFEVENTAUDIT, obj, override)
+
+##                elif classname == "WfTransition":
+##                    self.saveItWithLookup(self.WFTRANSITION, obj, override)
+
+##                elif classname == "Project":
+##                    #print "saving a project.  not project objects"
+##                    self.saveItWithLookup(self.PROJECT, obj, override)
 
-                elif classname == "Organization":
-                    self.saveItWithLookup(self.ORGANIZATION, obj, override)
+##                elif classname == "Organization":
+##                    self.saveItWithLookup(self.ORGANIZATION, obj, override)
 
-                elif classname == "Person":
-                    self.saveUser(obj)
+##                elif classname == "Person":
+##                    self.saveUser(obj)
 
-                else:
-                    print "have unknown obj to save", classname, obj
+##                else:
+##                    print "have unknown obj to save", classname, obj
                    
         self.Commit()
         return retlist
@@ -709,15 +768,14 @@
 
 
     def Add(self, unsavedlist):
-        # eventually remove this when all method calls have been changed 
+        # eventually remove this when all method calls have been changed
+        print "localdb.Add is deprecated.  use localdb.add"
         self.add(unsavedlist)
 
 
     def add(self, unsavedlist):
         #print "localdb.add"
-        if unsavedlist:
-            for obj in unsavedlist:
-                self.saveObject(self.UNCOMMITTEDOBJECTS, obj.pgef_oid, obj)
+        self.saveObjectWithLookup(self.UNCOMMITTEDOBJECTS, unsavedlist)
         self.Commit()
 
                
@@ -852,5 +910,116 @@
                 for tkey, tvalue in wfobj.transitions_dict.items():
                     self.saveItWithLookup(self.WFTRANSITION, tvalue, True)
         self.Commit()
+
+
+    def getCategories(self, context):
+#        print "localdb.getcategories", context
+        if self.dbroot[self.CATEGORY].has_key(context):
+#            print self.dbroot[self.CATEGORY].values()
+            return self.dbroot[self.CATEGORY][context].values()
+        return None
+
+    def saveCategories(self, context, values, override = False):
+        #print "localdb.savecategories.values", context
+        if self.dbroot[self.CATEGORY].has_key(context):
+            #print "have dict", context
+            if override:
+                for entry in self.dbroot[self.CATEGORY][context].keys():
+                    del self.dbroot[self.CATEGORY][context][entry]
+                return
+        else:
+            #print "make dict", context
+            self.dbroot[self.CATEGORY][context] = ZODB.Persistence.PersistentMapping()  
+        
+        #print "dict", self.CATEGORY, context, len(values)
+        tmpdict = ZODB.Persistence.PersistentMapping()  
+        for obj in values:
+            #print obj.id, obj.name
+            tmpdict[obj.id] = obj
+        self.dbroot[self.CATEGORY][context] = tmpdict
+        self.Commit()
+        
+
+
+    def getAlerts(self):
+        #print "localdb.getalerts"
+        tmpdict = {}
+
+        # eventually, when there are no subclasses for pgefadvisory
+        # all these objects will be in document
+
+        for docid, doc in self.dbroot[self.NASAADVISORY].items():
+            #print "getting local nasaadvisory", docid, "<", doc.state, ">"
+            if not doc.state:
+                tmpdict[docid] = doc
+            #else:
+            #    print "state", repr(doc.state)
+        
+        for docid, doc in self.dbroot[self.NASAIMPACTSTATEMENT].items():
+            #print "getting local impactstatement", docid, "<", doc.state, ">"
+            if not doc.state:
+                tmpdict[docid] = doc
+            #else:
+            #    print "state", repr(doc.state)
+        
+        for docid, doc in self.dbroot[self.GIDEPPROBLEMADVISORY].items():
+            #print "getting local problemadvisory", docid, "<", doc.state, ">"
+            if not doc.state:
+                tmpdict[docid] = doc
+            #else:
+            #    print "state", repr(doc.state)
+        
+        for docid, doc in self.dbroot[self.GIDEPALERT].items():
+            #print "getting local gidepalert", docid, "<", doc.state, ">"
+            if not(doc.state):
+                tmpdict[docid] = doc
+            #else:
+            #    print "state", repr(doc.state)
+        
+        #print "tmpdict1", tmpdict
+        for docid, doc in self.dbroot[self.UNCOMMITTEDOBJECTS].items():
+            if isinstance(doc, PgefAdvisory):
+                #print "checking", docid
+                #print docid
+                if doc.state <> objectstatus.DELETE:
+                    #print "getting uncomm alert", docid
+                    tmpdict[docid] = doc
+        #print "tmpdict2", tmpdict
+        return tmpdict
+
+        
+            
+    def getAlertsByUser(self, userid):
+        tmpdict = {}
+        docdict = self.getAlerts()
+        for docid, doc in docdict.items():
+            if doc.creator == userid:
+                tmpdict[docid] = doc
+        return tmpdict
+        
+            
+    def getAlertsByCenter(self, center_acronym): 
+        #print "alertsbycenter <" + center_acronym + ">"
+        tmpdict = {}
+        docdict = self.getAlerts()
+        for docid, doc in docdict.items():
+            if doc.center_acronym == center_acronym:
+                tmpdict[docid] = doc
+        return tmpdict
+        
+            
+        
+    def getUncommittedAlerts(self):
+        try:
+            uncommittedobjs = self.dbroot[self.UNCOMMITTEDOBJECTS]
+            objlist = []
+            for objid, obj in uncommittedobjs.items():
+                if isinstance(obj, PgefAdvisory):
+                    objlist.append(obj)
+            return objlist
+
+        except:
+            #print "no uncommitted objects; returning empty list"
+            return []
 
 

Index: PanGalactic/pangalactic/utils/dbbrowser.py
diff -u PanGalactic/pangalactic/utils/dbbrowser.py:1.18 PanGalactic/pangalactic/utils/dbbrowser.py:1.19
--- PanGalactic/pangalactic/utils/dbbrowser.py:1.18	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/utils/dbbrowser.py	Fri Apr 16 14:32:58 2004
@@ -19,15 +19,10 @@
 from pangalactic.utils.dbbrowser_wdr import *
 import pangalactic.utils.configuregrid as configuregrid
 import pangalactic.utils.localdb as localdb
+from pangalactic.enterprise.pgefobject import PgefObject
 
 DEBUG = 1
 
-COMPLEX_CLASS_TYPES = ["Project", "Acu", "Part", "Model", "Document", "DocPtRel",
-                       "WfActivity", "WfProcess", "WfTransition", "WfEventAudit"]
-DOC_CLASS_TYPES     = ["PgefAdvisory", "NasaAdvisory",
-                       "GidepAlert", "GidepProblemAdvisory", "NasaImpactStatement"]
-EXCLUDE_LIST = ["UncommittedObjects", "ProjectObjects"]
-
 class zodbbrowser(wxPanel):
     def __init__(self, parent, id, localdb,
                  pos = wxDefaultPosition, size = wxDefaultSize):
@@ -45,11 +40,15 @@
         EVT_BUTTON(self, ID_BUTTON_CONFIG, self.FileConfig)
         self.GetDisplayConfig()
         self.grid = self.GetGrid()
+        self.grid.SetColLabelSize(30)
         
 
     def GetRootitems(self):
         return wxPyTypeCast(self.FindWindowById(ID_ROOTITEMS), "wxListBox")
 
+    def GetConfigWgt(self):
+        return wxPyTypeCast(self.FindWindowById(ID_BUTTON_CONFIG), "wxButton")
+
     def GetOk(self):
         return wxPyTypeCast(self.FindWindowById(wxID_OK), "wxButton")
 
@@ -93,61 +92,16 @@
             self.dbfile = file
 
 
-##    def AddMenuForStandalone(self):
-##        mb = self.GetParent().GetMenuBar()
-##        menu = mb.GetMenu(mb.FindMenu('File'))
-##        self.FILEOPEN = wxNewId()
-##        menu.Insert(0, self.FILEOPEN, '&Open file')
-##        self.FILECLOSE = wxNewId()
-##        menu.Insert(1, self.FILECLOSE, '&Close file')
-##        menu.InsertSeparator(2)
-##        self.FILECONFIG = wxNewId()
-##        menu.Insert(3, self.FILECONFIG, 'Create config file...')
-##        menu.InsertSeparator(4)
-##        mb.Refresh()
-##        EVT_MENU(self.Parent, self.FILEOPEN, self.FileOpen)
-##        EVT_MENU(self.Parent, self.FILECLOSE, self.FileClose)
-##        EVT_MENU(self.Parent, self.FILECONFIG, self.FileConfig)
-        
-
     def GetDisplayConfig(self):
         self.current_config = self.localDB.getDisplayConfig()
         if len(self.current_config) == 0:
-            print "no config; setup default config?", self.current_config
+            #print "no config; setup default config?", self.current_config
             for dictname, keepflag, access_level in self.localDB.dictlist:
                 self.current_config[dictname] = []
             self.localDB.setDisplayConfig(self.current_config)
-            print "current_config", self.current_config
-            
+            #print "current_config", self.current_config
                 
             
-##    def FileOpen(self, event = None):
-##        wildcard = "ZODB FileStorage (*.fs)|*.fs|All files (*.*)|*.*"
-##        dlg = wxFileDialog(self, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE)
-##        if dlg.ShowModal() == wxID_OK:
-##            if self.dbroot:
-##                self.FileClose()
-##            self.storage = FileStorage.FileStorage(dlg.GetPath())
-##            self.db = DB(self.storage)
-##            self.dbconnection = self.db.open()
-##            self.dbroot = self.dbconnection.root()
-##            if self.dbroot.has_key(localdb.DISPLAY_CONFIG):
-##                self.current_config = self.dbroot[localdb.DISPLAY_CONFIG]
-##            self.FillChoice()
-##        dlg.Destroy()
-
-    
-##    def FileClose(self, event = None):
-##        self.dbconnection.close()
-##        self.db.close()
-##        self.storage.close()
-##        self.dbconnection = None
-##        self.db = None
-##        self.storage = None
-##        self.ClearGrid()
-##        self.GetRootitems().Clear()
-
-        
     def FileConfig(self, event = None):
         collection_name = self.GetRootitems().GetStringSelection()
         if collection_name:
@@ -165,20 +119,6 @@
             errdlg.CentreOnParent()
             errdlg.ShowModal()
 
-        
-##    def setColLabels(self, selection):
-###        print "dbbrowser.setcollabels", selection
-##        if self.current_config.has_key(selection):
-##            numcols = self.grid.GetNumberCols()
-##            if numcols > 0:
-##                self.grid.DeleteCols(0, numcols)
-                
-##            mapping = self.current_config[selection]
-##            self.grid.AppendCols(len(mapping))
-
-##            for col in range(len(mapping)):
-##                self.grid.SetColLabelValue(col, mapping[col][1])
-                
 
     def compareMapping(self, left, right):
         if left[1] > right[1]:
@@ -192,29 +132,49 @@
     def newConfigEntry(self, selection, collection_dict):
         # how many columns should there be?
         maxcols = 0
-        mapping = {}
+        mapping = []
         for obj_id, obj in collection_dict.items():
             if hasattr(obj, "__dict__"):
+                mapping = []
+                fmap = []
                 try:
                     maxcols = len(obj.__dict__)
                     self.grid.AppendCols(maxcols)
                     attr_keys = obj.__dict__.keys()
-                    mapping = []
                     col = 0
                     # make the column labels (attribute names) look pretty
                     for attr_key in attr_keys:
                         col_label = attr_key.replace("_", " ").title().strip()
-                        mapping.append((attr_key, col_label))
+                        fmap.append([attr_key, col_label, "string"])
                         col += 1
-
-                    if len(mapping) > 0:
-                        mapping.sort(self.compareMapping)
-                        for col in range(len(mapping)):
-                            self.grid.SetColLabelValue(col, mapping[col][1])
-                    break
                 except:
                     print "Sorry.  Ungriddable object.  Better luck next time."
-                    return {}
+                    return []
+
+                # sort the full mapping by column label
+                if len(fmap) > 0:
+                    fmap.sort(self.compareMapping)
+
+                # look for a default mapping for the specific class
+                if isinstance(obj, PgefObject):
+                    dmap = obj.getDisplayMap()
+                    if len(dmap) > 0:
+                        dnames = obj.getDisplayOrder()
+                        # move any attributes in the class default
+                        # to the front/beginning/left/whatever.
+                        if selection in localdb.NARS_CLASSES:
+                            #print "have NARS type"
+                            pass
+                        else:
+                            for m_attr, m_label, m_type in fmap:
+                                if not (m_attr in dnames):
+                                    dmap.append([m_attr, m_label, m_type])
+                    mapping = dmap
+                else:
+                    mapping = fmap
+                for col in range(len(mapping)):
+                    self.grid.SetColLabelValue(col, mapping[col][1])
+                break
 
             elif isinstance(obj, types.StringType):
                 maxcols = 2
@@ -232,8 +192,8 @@
                 break
 
             else:
-                print "dbbrowser.fillgrid: only objects or strings", selection
-                return {}
+                print "dbbrowser.newconfigentry: only objects or strings", selection
+                return []
         return mapping
     
         
@@ -246,9 +206,15 @@
                 self.grid.DeleteRows(0, self.grid.GetNumberRows())
 
             selection = self.GetRootitems().GetStringSelection()
-            if selection in EXCLUDE_LIST:
-                print selection, "is not yet implemented"
+            if selection in localdb.EXCLUDE_CLASSES:
+                print selection, "is not configurable"
+                self.GetConfigWgt().Enable(False)
+            elif selection in localdb.NOTYET_CLASSES:
+                print selection, "is not configurable YET"
+                self.GetConfigWgt().Enable(False)
                 return
+            else:
+                self.GetConfigWgt().Enable(True)
 
             # how many rows should there be?
             collection_dict = self.localDB.getDict(selection)
@@ -291,9 +257,9 @@
                         try:
                             val = str(attrvalue)
                             classname = attrvalue.__class__.__name__
-                            if classname in DOC_CLASS_TYPES:
+                            if classname in localdb.NARS_CLASSES:
                                 val = attrvalue.id + "(" + attrvalue.getPrettyDocType() + ")"
-                            elif classname in COMPLEX_CLASS_TYPES:
+                            elif classname in localdb.PGEF_CLASSES:
                                 val = attrvalue.id + " (" + classname + ")"
 
                             elif (isinstance(attrvalue, types.DictType) or
@@ -303,8 +269,8 @@
                                         attrclass = attrvalue[0].__class__.__name__
                                     else:
                                         attrclass = attrvalue[attrvalue.keys()[0]].__class__.__name__
-                                    if (attrclass in DOC_CLASS_TYPES or
-                                        attrclass in COMPLEX_CLASS_TYPES):
+                                    if (attrclass in localdb.NARS_CLASSES or
+                                        attrclass in localdb.PGEF_CLASSES):
                                          val = str(len(attrvalue)) + " elements"
                         except:
                             pass
@@ -318,22 +284,4 @@
                     
             self.grid.AutoSizeColumns(true)
 
-
-###----------------------------------------------------------------------------
-##if __name__ == '__main__':
-##    wxInitAllImageHandlers()
-    
-##    class ZODBBrowser(wxApp):
-            
-##        def OnInit(self):
-##            self.frame = toolframe.toolFrame(NULL, -1, 'ZODB Browser', wxDefaultPosition, wxSize(640, 480))
-##            self.frame.mainpanel = zodbbrowser(self.frame, -1, zodbroot = None)
-##            self.frame.mainpanel.AddMenuForStandalone()
-##            self.frame.CentreOnParent()                              
-##            self.frame.Show(true)
-    
-##            return true
-    
-##    app = ZODBBrowser(0)
-##    app.MainLoop()
 

Index: PanGalactic/pangalactic/enterprise/acu.py
diff -u PanGalactic/pangalactic/enterprise/acu.py:1.7 PanGalactic/pangalactic/enterprise/acu.py:1.8
--- PanGalactic/pangalactic/enterprise/acu.py:1.7	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/acu.py	Fri Apr 16 14:32:57 2004
@@ -1,4 +1,4 @@
-# $Id: acu.py,v 1.7 2004/04/14 20:48:26 pbear Exp $
+# $Id: acu.py,v 1.8 2004/04/16 18:32:57 pbear Exp $
 
 """
 Assembly Component Usage (ACU)
@@ -7,10 +7,10 @@
 I{component}) and another Model (the I{assembly}) of which it
 is a constituent part.
 
-@version: $Revision: 1.7 $
+@version: $Revision: 1.8 $
 """
 
-__version__ = "$Revision: 1.7 $"[11:-2]
+__version__ = "$Revision: 1.8 $"[11:-2]
 
 from pangalactic.utils import oid
 from pangalactic.enterprise.pgefobject import PgefObject
@@ -30,20 +30,12 @@
     I{component}) and another Model (the I{assembly}) of which it
     is a constituent part.
     """
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     # _excluded_fields are those inherited from PgefObject
     _fk = {
            '_assembly'  : 'assembly_oid',
            '_component' : 'component_oid'
           }
-#    _gridmap =  [
-#                 ['Assembly PN', 'self.assembly_oid', 'string'],
-#                 ['Component PN', 'self.component_oid', 'string'],
-#                 ['Delete', 'self.Delete', 'boolean'],
-#                 ['Ref Designator', 'self.ref_designator', 'string']
-#                ]
+
     _pk = ['pgef_oid']
     _properties = PgefObject._properties.copy()
     _schema = PgefObject._schema.copy()

Index: PanGalactic/pangalactic/enterprise/docptrel.py
diff -u PanGalactic/pangalactic/enterprise/docptrel.py:1.6 PanGalactic/pangalactic/enterprise/docptrel.py:1.7
--- PanGalactic/pangalactic/enterprise/docptrel.py:1.6	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/docptrel.py	Fri Apr 16 14:32:57 2004
@@ -1,12 +1,12 @@
-# $Id: docptrel.py,v 1.6 2004/04/14 20:48:26 pbear Exp $
+# $Id: docptrel.py,v 1.7 2004/04/16 18:32:57 pbear Exp $
 
 """
 A relationship between a Document and a Part.
 
-@version: $Revision: 1.6 $
+@version: $Revision: 1.7 $
 """
 
-__version__ = "$Revision: 1.6 $"[11:-2]
+__version__ = "$Revision: 1.7 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -16,9 +16,6 @@
     """
     _contains = {}
     _contains_methods = {}
-    _default_display_order = []
-    _default_display_names = {}
-    _default_display_types = {}
     _excluded_fields_ext = []
     _excluded_fields = PgefObject._excluded_fields
     _excluded_fields += _excluded_fields_ext
@@ -27,7 +24,6 @@
            '_doc' : 'doc_oid',
            '_part' : 'part_oid'
           }
-#    _gridmap = []
     _properties = PgefObject._properties.copy()
     _required = ['id']
     _refs = {

Index: PanGalactic/pangalactic/enterprise/document.py
diff -u PanGalactic/pangalactic/enterprise/document.py:1.47 PanGalactic/pangalactic/enterprise/document.py:1.48
--- PanGalactic/pangalactic/enterprise/document.py:1.47	Wed Apr 14 16:48:26 2004
+++ PanGalactic/pangalactic/enterprise/document.py	Fri Apr 16 14:32:57 2004
@@ -1,10 +1,10 @@
-# $Id: document.py,v 1.47 2004/04/14 20:48:26 pbear Exp $
+# $Id: document.py,v 1.48 2004/04/16 18:32:57 pbear Exp $
 
 """
 The Mother of all PGEF Document types.  :)
 """
 
-__version__ = "$Revision: 1.47 $"[11:-2]
+__version__ = "$Revision: 1.48 $"[11:-2]
 
 import string
 from pangalactic.enterprise.versionedobject import VersionedObject
@@ -36,20 +36,18 @@
     _contains_methods = VersionedObject._contains_methods.copy()
     _contains_methods_ext = {'_files' : 'addFile'}
     _contains_methods.update(_contains_methods_ext)
-#    _default_display_order = []
-#    _default_display_names = {}
-#    _default_display_types = {}
     _excluded_fields = VersionedObject._excluded_fields
     _fk = {
            '_project' : 'project_oid'
           }
-#    _gridmap = [
-#                ['Title',   'self.Title'],
-#                ['Creator', 'self.creator_oid'],
-#                ['Rev',     'self.Revision'],
-#                ['Date',    'self.Date'],
-#                ['Type',    'self.DocType']
-#               ]
+    _default_display_names = {"Title": "Title",
+                              "creator_oid": "Creator",
+                              "Revision": "Rev",
+                              "Date": "Date",
+                              "DocType": "Type"}
+    _default_display_order = ["Title", "creator_oid", "Revision", "Date", "DocType"]
+    _default_display_types = {}
+
     # These are from the Dublin Core, and are computed attributes
     _properties = {
                    'Title'       : 'str',

From pbear at ned.gsfc.nasa.gov  Fri Apr 16 16:09:26 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Fri Apr 16 16:09:28 2004
Subject: [Pangalactic-commits] yet another interim checkin. this one is for
	steve, too
Message-ID: <200404162009.i3GK9QAd010370@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/enterprise/acu.py 1.8 1.9
PanGalactic/pangalactic/enterprise/docptrel.py 1.7 1.8
PanGalactic/pangalactic/enterprise/partslist.py 1.19 1.20
PanGalactic/pangalactic/enterprise/pgefobject.py 1.51 1.52
PanGalactic/pangalactic/enterprise/project.py 1.20 1.21
PanGalactic/pangalactic/enterprise/versionedobject.py 1.6 1.7
PanGalactic/pangalactic/enterprise/workflow/wfactivity.py 1.21 1.22
PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py 1.8 1.9
PanGalactic/pangalactic/enterprise/workflow/wftransition.py 1.11 1.12
PanGalactic/pangalactic/utils/dbbrowser.py 1.19 1.20

Log message:
yet another interim checkin.  this one is for steve, too


Index: PanGalactic/pangalactic/enterprise/workflow/wfactivity.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.21 PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.22
--- PanGalactic/pangalactic/enterprise/workflow/wfactivity.py:1.21	Fri Apr 16 14:32:58 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfactivity.py	Fri Apr 16 16:09:24 2004
@@ -72,6 +72,9 @@
         self.parent_id  = parentId
         self.can_start = 0
         self.fields = fields
+        self.activity = ""
+        self.duration = ""
+        self.description = ""
 
         self._display_map = self.getDisplayMap()
 

Index: PanGalactic/pangalactic/enterprise/docptrel.py
diff -u PanGalactic/pangalactic/enterprise/docptrel.py:1.7 PanGalactic/pangalactic/enterprise/docptrel.py:1.8
--- PanGalactic/pangalactic/enterprise/docptrel.py:1.7	Fri Apr 16 14:32:57 2004
+++ PanGalactic/pangalactic/enterprise/docptrel.py	Fri Apr 16 16:09:23 2004
@@ -1,12 +1,12 @@
-# $Id: docptrel.py,v 1.7 2004/04/16 18:32:57 pbear Exp $
+# $Id: docptrel.py,v 1.8 2004/04/16 20:09:23 pbear Exp $
 
 """
 A relationship between a Document and a Part.
 
-@version: $Revision: 1.7 $
+@version: $Revision: 1.8 $
 """
 
-__version__ = "$Revision: 1.7 $"[11:-2]
+__version__ = "$Revision: 1.8 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -20,6 +20,8 @@
     _excluded_fields = PgefObject._excluded_fields
     _excluded_fields += _excluded_fields_ext
     _excluded_dump = []
+    _default_display_names = {"_doc": "Document", "_part": "Part(s)"}
+    _default_display_order = ["_doc", "_part"]
     _fk = {
            '_doc' : 'doc_oid',
            '_part' : 'part_oid'
@@ -51,5 +53,5 @@
         """
         PgefObject.__init__(self, **kw)
         self._doc = kw.get('_doc')
-        self._part = kw.get('_files', [])
+        self._part = kw.get('_part', [])
 

Index: PanGalactic/pangalactic/enterprise/partslist.py
diff -u PanGalactic/pangalactic/enterprise/partslist.py:1.19 PanGalactic/pangalactic/enterprise/partslist.py:1.20
--- PanGalactic/pangalactic/enterprise/partslist.py:1.19	Fri Apr 16 14:32:57 2004
+++ PanGalactic/pangalactic/enterprise/partslist.py	Fri Apr 16 16:09:23 2004
@@ -1,11 +1,11 @@
-# $Id: partslist.py,v 1.19 2004/04/16 18:32:57 pbear Exp $
+# $Id: partslist.py,v 1.20 2004/04/16 20:09:23 pbear Exp $
 
 """
 A Document consisting of a collection of Part references and
 associated data.
 """
 
-__version__ = "$Revision: 1.19 $"[11:-2]
+__version__ = "$Revision: 1.20 $"[11:-2]
 
 from pangalactic.enterprise.document import Document
 
@@ -18,14 +18,10 @@
     _excluded_fields = []
     _fk = {}
 
-# need to go over this; I think it's out of date; postpone _default_display_xxx until then
-#    _gridmap = [
-#                ['Partslist ID', 'self.id', 'string'],
-#                ['Project\nName Code', 'self._project.id', 'string'],
-#                ['Identifier', 'self.id', 'string'],
-#                ['Point of\nContact', 'self.owner_oid', 'string'],
-#                ['Version', 'self.version', 'string']
-#               ]
+    _default_display_order = ["id", "owner_oid", "version"]
+    _default_display_names = {"id": "Parts List ID",
+                              "owner_oid": "Point of Contact",
+                              "version": "Version"}
     _properties = {
                    'PointofContact' : 'str',
                    'Identifier'     : 'str',

Index: PanGalactic/pangalactic/enterprise/versionedobject.py
diff -u PanGalactic/pangalactic/enterprise/versionedobject.py:1.6 PanGalactic/pangalactic/enterprise/versionedobject.py:1.7
--- PanGalactic/pangalactic/enterprise/versionedobject.py:1.6	Fri Apr 16 14:32:58 2004
+++ PanGalactic/pangalactic/enterprise/versionedobject.py	Fri Apr 16 16:09:23 2004
@@ -1,11 +1,11 @@
-# $Id: versionedobject.py,v 1.6 2004/04/16 18:32:58 pbear Exp $
+# $Id: versionedobject.py,v 1.7 2004/04/16 20:09:23 pbear Exp $
 
 """
 A thing which evolves in a set of discrete, identified
 incarnations.
 """
 
-__version__ = "$Revision: 1.6 $"[11:-2]
+__version__ = "$Revision: 1.7 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 from pangalactic.enterprise.project import Project
@@ -27,15 +27,6 @@
            '_project' : 'project_oid'
           }
 
-    # These are the fields that will appear in when an item is placed in a grid.
-
-# I don't think versionedobject itself will ever be in a grid.  only its subclasses
-#    _gridmap = [
-#                ['Name\nCode','self.name', 'string'],
-#                ['Name','self.short_description', 'string'],
-#                ['Created','self.create_datetime', 'string'],
-#                ['Creator','self.creator_oid', 'string']
-#               ]
     _schema_ext = {
                    'iteration'              : 'int',
                    'version'                : 'str',

Index: PanGalactic/pangalactic/enterprise/pgefobject.py
diff -u PanGalactic/pangalactic/enterprise/pgefobject.py:1.51 PanGalactic/pangalactic/enterprise/pgefobject.py:1.52
--- PanGalactic/pangalactic/enterprise/pgefobject.py:1.51	Fri Apr 16 14:32:57 2004
+++ PanGalactic/pangalactic/enterprise/pgefobject.py	Fri Apr 16 16:09:23 2004
@@ -1,9 +1,9 @@
-# $Id: pgefobject.py,v 1.51 2004/04/16 18:32:57 pbear Exp $
+# $Id: pgefobject.py,v 1.52 2004/04/16 20:09:23 pbear Exp $
 
 """
 The Mother of all PGEF Enterprise Classes.
 
-@version: $Revision: 1.51 $
+@version: $Revision: 1.52 $
 """
 
 # TODO:
@@ -23,7 +23,7 @@
 #             - checks for required fields
 #               
 
-__version__ = "$Revision: 1.51 $"[11:-2]
+__version__ = "$Revision: 1.52 $"[11:-2]
 
 import types
 import string
@@ -121,8 +121,13 @@
                     relationship tables and foreign key
                     constraint names)
     """
-    _default_display_order = []
-    _default_display_names = {}
+    _default_display_order = ["id", "name", "short_description", "create_datetime", "creator_oid"]
+    _default_display_names = {"id": "id",
+                              "name": "Name",
+                              "short_description": "Description",
+                              "create_datetime": "Created",
+                              "creator_oid": "Creator"}
+
     _default_display_types = {}
 
     # pgef_oid, create_datetime, and mod_datetime are excluded

Index: PanGalactic/pangalactic/enterprise/acu.py
diff -u PanGalactic/pangalactic/enterprise/acu.py:1.8 PanGalactic/pangalactic/enterprise/acu.py:1.9
--- PanGalactic/pangalactic/enterprise/acu.py:1.8	Fri Apr 16 14:32:57 2004
+++ PanGalactic/pangalactic/enterprise/acu.py	Fri Apr 16 16:09:23 2004
@@ -1,4 +1,4 @@
-# $Id: acu.py,v 1.8 2004/04/16 18:32:57 pbear Exp $
+# $Id: acu.py,v 1.9 2004/04/16 20:09:23 pbear Exp $
 
 """
 Assembly Component Usage (ACU)
@@ -7,10 +7,10 @@
 I{component}) and another Model (the I{assembly}) of which it
 is a constituent part.
 
-@version: $Revision: 1.8 $
+@version: $Revision: 1.9 $
 """
 
-__version__ = "$Revision: 1.8 $"[11:-2]
+__version__ = "$Revision: 1.9 $"[11:-2]
 
 from pangalactic.utils import oid
 from pangalactic.enterprise.pgefobject import PgefObject
@@ -58,6 +58,13 @@
     # constraints)
     _std_abbrev = 'acu'
     pgef_class = 'Acu'
+
+    _default_display_order = ["_assembly", "_component", "owner_oid", "creator_oid", "ref_designator"]
+    _default_display_names = {"_assembly": "Assembly",
+                              "_component": "Component",
+                              "owner_oid": "Owner",
+                              "creator_oid": "Creator",
+                              "ref_designator": "Ref. Designator"}
 
     def __init__(self, _assembly=None, _component=None, **kw):
         """

Index: PanGalactic/pangalactic/enterprise/project.py
diff -u PanGalactic/pangalactic/enterprise/project.py:1.20 PanGalactic/pangalactic/enterprise/project.py:1.21
--- PanGalactic/pangalactic/enterprise/project.py:1.20	Fri Apr 16 14:32:57 2004
+++ PanGalactic/pangalactic/enterprise/project.py	Fri Apr 16 16:09:23 2004
@@ -1,12 +1,12 @@
-# $Id: project.py,v 1.20 2004/04/16 18:32:57 pbear Exp $
+# $Id: project.py,v 1.21 2004/04/16 20:09:23 pbear Exp $
 
 """
 A specific, identifiable activity of Organizations and Persons.
 
-@version: $Revision: 1.20 $
+@version: $Revision: 1.21 $
 """
 
-__version__ = "$Revision: 1.20 $"[11:-2]
+__version__ = "$Revision: 1.21 $"[11:-2]
 
 from pangalactic.enterprise.pgefobject import PgefObject
 
@@ -33,15 +33,14 @@
     # These are the fields that will appear in when a Project is
     # placed in a grid.  
 
-# do we ever plan to display project data in a grid?
-#    _gridmap = [
-#                ['Project\nAcronym','self.id', 'string'],
-#                ['Project\nName','self.name', 'string'],
-#                ['POC','self.owner', 'string'],
-#                ['Description','self.short_description', 'string'],
-#                ['Created','self.create_datetime', 'string'],
-#                ['Creator','self.creator_oid', 'string']
-#               ]
+    _default_display_order = ["id", "name", "owner_oid", "short_description", "create_datetime", "creator_oid"]
+    _default_display_names = {"id": "Project Acronym",
+                              "name": "Project Name",
+                              "owner_oid": "POC",
+                              "short_description": "Description",
+                              "create_datetime": "Created",
+                              "creator_oid": "Creator"}
+
     _pk = ['id', 'id_context']
     _schema_ext = {}
     _schema = _schema_ext.copy()

Index: PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py:1.8 PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py:1.9
--- PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py:1.8	Fri Apr  2 15:34:37 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wfeventaudit.py	Fri Apr 16 16:09:24 2004
@@ -2,7 +2,6 @@
 An element of a workflow history.
 """
 
-
 import time
 from pangalactic.enterprise.pgefobject import PgefObject
 from pangalactic.enterprise.workflow.wfexceptions import *
@@ -15,7 +14,10 @@
 
     Note: Any methods required by WfMC are commented as such.
     """
-
+    _default_display_names = {"wfobjectid": "Document Id",
+                              "timestamep": "Date",
+                              "event_type": "Event Type"}
+    _default_display_order = ["wfobjectid", "timestamp", "event_type"]
     _properties = {"event_type"  : "int",
                    "wfobject_id" : "str",
                    "timestamp"   : "DateTime"}

Index: PanGalactic/pangalactic/enterprise/workflow/wftransition.py
diff -u PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.11 PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.12
--- PanGalactic/pangalactic/enterprise/workflow/wftransition.py:1.11	Wed Apr 14 16:48:27 2004
+++ PanGalactic/pangalactic/enterprise/workflow/wftransition.py	Fri Apr 16 16:09:24 2004
@@ -8,7 +8,7 @@
     @param from_activity: The starting state (WfActivity) 
     """
 
-__version__ = "$Revision: 1.11 $"[11:-2]
+__version__ = "$Revision: 1.12 $"[11:-2]
 
 from pangalactic.utils import oid
 from pangalactic.enterprise.pgefobject import PgefObject
@@ -17,13 +17,10 @@
     """
     This class is a link between two workflow states.
     """
-    
-#    _defaultgridmap = [["From Activity", "self.from_activity.name", "string", ""],
-#                       ["To Activity",   "self.to_activity.name",   "string", ""]]
-
-#    _map = [["From Activity", "self.from_activity.name", "string", ""],
-#            ["To Activity",   "self.to_activity.name",   "string", ""]]
 
+    _default_display_order = ["from_activity", "to_activity"]
+    _default_display_names = {"from_activity": "From Activity",
+                              "to_activity": "To Activity"}
     _properties = {"parentId" : "str"}
                    
     def __init__(self, from_activity, to_activity, parentId):

Index: PanGalactic/pangalactic/utils/dbbrowser.py
diff -u PanGalactic/pangalactic/utils/dbbrowser.py:1.19 PanGalactic/pangalactic/utils/dbbrowser.py:1.20
--- PanGalactic/pangalactic/utils/dbbrowser.py:1.19	Fri Apr 16 14:32:58 2004
+++ PanGalactic/pangalactic/utils/dbbrowser.py	Fri Apr 16 16:09:24 2004
@@ -162,13 +162,16 @@
                         dnames = obj.getDisplayOrder()
                         # move any attributes in the class default
                         # to the front/beginning/left/whatever.
-                        if selection in localdb.NARS_CLASSES:
-                            #print "have NARS type"
-                            pass
-                        else:
-                            for m_attr, m_label, m_type in fmap:
-                                if not (m_attr in dnames):
-                                    dmap.append([m_attr, m_label, m_type])
+#                        if selection in localdb.NARS_CLASSES:
+#                            #print "have NARS type"
+#                            pass
+#                        else:
+#                            for m_attr, m_label, m_type in fmap:
+#                                if not (m_attr in dnames):
+#                                    dmap.append([m_attr, m_label, m_type])
+                        for m_attr, m_label, m_type in fmap:
+                            if not (m_attr in dnames):
+                                dmap.append([m_attr, m_label, m_type])
                     mapping = dmap
                 else:
                     mapping = fmap
@@ -179,7 +182,7 @@
             elif isinstance(obj, types.StringType):
                 maxcols = 2
                 self.grid.AppendCols(maxcols)
-                self.grid.SetColLabelValue(0, "Id")
+                self.grid.SetColLabelValue(0, "ID")
                 self.grid.SetColLabelValue(1, "Value")
                 break
 
@@ -272,10 +275,10 @@
                                     if (attrclass in localdb.NARS_CLASSES or
                                         attrclass in localdb.PGEF_CLASSES):
                                          val = str(len(attrvalue)) + " elements"
+                            self.grid.SetCellValue(curr_row, col, val)
                         except:
                             pass
 
-                        self.grid.SetCellValue(curr_row, col, val)
                         col += 1
                 else:
                     print "wtf", obj_id

From waterbug at ned.gsfc.nasa.gov  Fri Apr 16 18:44:11 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Fri Apr 16 18:44:13 2004
Subject: [Pangalactic-commits] Minor tweaks
Message-ID: <200404162244.i3GMiB8k012969@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/repo/pger.py 1.63 1.64
PanGalactic/src/express/exp/pger.exp 1.1 1.2
PanGalactic/src/express/exx/ap210-to-pger.exx 1.1 1.2

Log message:
Minor tweaks


Index: PanGalactic/src/express/exp/pger.exp
diff -u PanGalactic/src/express/exp/pger.exp:1.1 PanGalactic/src/express/exp/pger.exp:1.2
--- PanGalactic/src/express/exp/pger.exp:1.1	Mon Sep 15 16:45:54 2003
+++ PanGalactic/src/express/exp/pger.exp	Fri Apr 16 18:44:09 2004
@@ -1,6 +1,6 @@
-SCHEMA pger_schema;
+SCHEMA pger;
 
-ENTITY product_master;
+ENTITY part;
   id                : STRING;
   name              : STRING;
   short_description : STRING;
@@ -39,3 +39,4 @@
 END_ENTITY; -- assembly_component_usage
 
 END_SCHEMA;
+

Index: PanGalactic/pangalactic/repo/pger.py
diff -u PanGalactic/pangalactic/repo/pger.py:1.63 PanGalactic/pangalactic/repo/pger.py:1.64
--- PanGalactic/pangalactic/repo/pger.py:1.63	Wed Mar 10 18:00:07 2004
+++ PanGalactic/pangalactic/repo/pger.py	Fri Apr 16 18:44:08 2004
@@ -1,11 +1,11 @@
 """
 Pan Galactic Entropy Reverser module
 
-@version: $Revision: 1.63 $
+@version: $Revision: 1.64 $
 """
 
-__version__ = "$Revision: 1.63 $"[11:-2]
-# $Id: pger.py,v 1.63 2004/03/10 23:00:07 waterbug Exp $
+__version__ = "$Revision: 1.64 $"[11:-2]
+# $Id: pger.py,v 1.64 2004/04/16 22:44:08 waterbug Exp $
 
 import os
 import string
@@ -124,35 +124,37 @@
         mapped object class, call _getMappedObjects.
 
         @type  classname:  string
-        @param classname:  the name of a PGER object type (i.e., a
-                      subtype of
-                      L{pangalactic.enterprise.pgefobject.PgefObject})
+        @param classname:  the name of a PGEF ontoclass.  This
+                    can be either a subtype of
+                    L{pangalactic.enterprise.pgefobject.PgefObject})
+                    or an ontoclass known to the PgefRegistry.
 
         @type  requestor:  string
         @param requestor:  the username of the user making the
-                      request
+                    request
 
         @type  refs:  integer
         @param refs:  specifies whether to include the objects
-                      referenced by the specified class.
+                    referenced by the specified class.
                       
-                      0:  (default) do not get refs
-                      1:  get all references
+                        0:  (default) do not get refs
+                        1:  get all references
 
-                      (in future, refs may specify how many
-                      reference levels to follow ...)
+                    (in future, refs may specify how many
+                    reference levels to follow ...)
 
         @type  subtypes:  boolean
         @param subtypes:  specifies whether to include only the
-                      specified class (the default) or all
-                      subtypes.
+                    specified class (the default) or all
+                    subtypes.
 
-                      0:  (default) only this type
-                      1:  include subtypes
+                        0:  (default) only this type
+                        1:  include subtypes
 
         @param kw:  keyword arguments of the form:
-                      key:   an attribute of the object
-                      value: the value to be selected by
+
+                    key:   an attribute of the object
+                    value: the value to be selected by
 
         @rtype:  list
         @return: list of pyPgSQL result sets
@@ -180,9 +182,6 @@
              object type, etc.
 
         @type  classname:  string
-        @param classname:  the name of a PGER object type (i.e., a
-                          subtype of
-                          L{pangalactic.enterprise.pgefobject.PgefObject})
 
         @type  requestor:  string
         @param requestor:  the username of the user making the
@@ -191,21 +190,25 @@
         @type  refs:  boolean
         @param refs:  specifies whether to include the objects
                       referenced by the specified class.
+
                           0:  (default) do not get refs
                           1:  get all references
+
                       (in future, refs may specify how many
                       reference levels to follow ...)
 
         @type  subtypes:  boolean
         @param subtypes:  specifies whether to include only the
-                          specified class (the default) or all
-                          subtypes.
-                              0:  (default) only this type
-                              1:  include subtypes
+                      specified class (the default) or all
+                      subtypes.
+
+                          0:  (default) only this type
+                          1:  include subtypes
 
         @param kw:  keyword arguments of the form:
-                        key:   an attribute of the object
-                        value: the value to be selected by
+
+                          key:   an attribute of the object
+                          value: the value to be selected by
 
         @rtype:  list
         @return: list of pyPgSQL result sets

Index: PanGalactic/src/express/exx/ap210-to-pger.exx
diff -u PanGalactic/src/express/exx/ap210-to-pger.exx:1.1 PanGalactic/src/express/exx/ap210-to-pger.exx:1.2
--- PanGalactic/src/express/exx/ap210-to-pger.exx:1.1	Sun Feb  9 20:53:16 2003
+++ PanGalactic/src/express/exx/ap210-to-pger.exx	Fri Apr 16 18:44:09 2004
@@ -1,16 +1,16 @@
 -- -*- Mode: ExpressX -*-
 
 --
--- Translate AP210 to PGERDB Schema
+-- Translate AP210 to PGER Schema
 --
 
-SCHEMA_MAP ap210_to_pgerdb;
-  REFERENCE FROM pgerdb : pgerdb AS TARGET;
+SCHEMA_MAP ap210_to_pger;
+  REFERENCE FROM pger : pger AS TARGET;
   REFERENCE FROM ap210 : electronic_assembly_interconnect_and_packaging_design AS SOURCE;
 
-MAP map_product_to_product_master
-  AS    trg  : pgerdb.product_masters;
-        -- fors : pgerdb.ctn;
+MAP map_product_to_part
+  AS    trg  : pger.part;
+        -- fors : pger.ctn;
   FROM  src  : ap210.product;
 SELECT
    trg.id := src.id;
@@ -20,19 +20,19 @@
    -- fors.c := FOR EACH item IN src.frame_of_reference
    --           RETURN trg@map_product_context(item);
    -- fors.size := SIZEOF(fors.c);
-END_MAP; -- map_product_to_product_master
+END_MAP; -- map_product_to_part
 
 -- MAP map_application_context
 -- -- id_attribute and description_attribute are implemented as
 -- -- objects that point back to application_context
---   AS    trg : pgerdb.application_context;
+--   AS    trg : pger.application_context;
 --   FROM  src : ap210.application_context;
 -- SELECT
 --    trg.application := src.application;
 -- END_MAP; -- map_application_context
 
 -- MAP map_product_definition_context
---   AS    trg : pgerdb.product_definition_context;
+--   AS    trg : pger.product_definition_context;
 --   FROM  src : ap210.product_definition_context;
 -- SELECT
 --    trg.name := src.name;
@@ -41,7 +41,7 @@
 -- END_MAP; -- map_product_definition_context
 
 -- MAP map_product_context
---   AS    trg : pgerdb.product_context;
+--   AS    trg : pger.product_context;
 --   FROM  src : ap210.product_context;
 -- SELECT
 --    trg.name := src.name;
@@ -50,7 +50,7 @@
 -- END_MAP; -- map_product_context
 
 MAP map_product_definition_formation_to_product_version
-  AS    trg : pgerdb.product_versions;
+  AS    trg : pger.product_versions;
   FROM  src : ap210.product_definition_formation;
 SELECT
    trg.id := src.id;
@@ -59,7 +59,7 @@
 END_MAP; -- map_product_definition_formation_to_product_version
 
 MAP map_product_definition_to_product_model_version
-  AS    trg : pgerdb.product_model_versions;
+  AS    trg : pger.product_model_versions;
   FROM  src : ap210.product_definition;
 SELECT
    trg.id := src.id;
@@ -70,7 +70,7 @@
 END_MAP; -- map_product_definition_to_product_model_version
 
 MAP map_assembly_component_usage
-  AS    trg : pgerdb.assembly_component_usages;
+  AS    trg : pger.assembly_component_usages;
   FROM  src : ap210.assembly_component_usage;
 SELECT
    trg.id := src.id;

From waterbug at ned.gsfc.nasa.gov  Mon Apr 19 13:08:38 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Mon Apr 19 13:08:41 2004
Subject: [Pangalactic-commits] Removed schema module;
	added versionedobject module.
Message-ID: <200404191708.i3JH8c6R004761@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/enterprise/__init__.py 1.17 1.18

Log message:
Removed schema module; added versionedobject module.


Index: PanGalactic/pangalactic/enterprise/__init__.py
diff -u PanGalactic/pangalactic/enterprise/__init__.py:1.17 PanGalactic/pangalactic/enterprise/__init__.py:1.18
--- PanGalactic/pangalactic/enterprise/__init__.py:1.17	Wed Mar 10 17:14:57 2004
+++ PanGalactic/pangalactic/enterprise/__init__.py	Mon Apr 19 13:08:37 2004
@@ -14,5 +14,5 @@
            'project',
            'property',
            'role',
-           'schema']
+           'versionedobject']
 

From waterbug at ned.gsfc.nasa.gov  Mon Apr 19 14:25:44 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Mon Apr 19 14:25:45 2004
Subject: [Pangalactic-commits] Registry singleton is now a module (as GvR
	recommends ; ).
Message-ID: <200404191825.i3JIPiJZ005647@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/repo/pgerregistry.py 1.4 1.5
PanGalactic/pangalactic/utils/factory.py 1.28 1.29
PanGalactic/pangalactic/utils/registry.py 1.14 1.15

Log message:
Registry singleton is now a module (as GvR recommends ;).


Index: PanGalactic/pangalactic/repo/pgerregistry.py
diff -u PanGalactic/pangalactic/repo/pgerregistry.py:1.4 PanGalactic/pangalactic/repo/pgerregistry.py:1.5
--- PanGalactic/pangalactic/repo/pgerregistry.py:1.4	Tue Mar  9 15:15:27 2004
+++ PanGalactic/pangalactic/repo/pgerregistry.py	Mon Apr 19 14:25:42 2004
@@ -1,18 +1,18 @@
 """
 Pan Galactic Engineering Repository Object Registry
-@version: $Revision: 1.4 $
+@version: $Revision: 1.5 $
 """
  
-__version__ = "$Revision: 1.4 $"[11:-2]
-# $Id: pgerregistry.py,v 1.4 2004/03/09 20:15:27 waterbug Exp $
+__version__ = "$Revision: 1.5 $"[11:-2]
+# $Id: pgerregistry.py,v 1.5 2004/04/19 18:25:42 waterbug Exp $
 
 import string, re
 from pyPgSQL import PgSQL
-from pangalactic.utils.registry import PgefRegistry
+from pangalactic.utils import registry
 from pangalactic.enterprise.pgefobject import PgefObject
 # from pangalactic.enterprise.schema import Schema
 
-class PgerObjectRegistry(PgefRegistry):
+class PgerObjectRegistry:
     """
     I maintain a set of dictionaries used by the
     PgerObjectFactory to build objects from the results of PgerDb
@@ -157,11 +157,19 @@
                           read from vgernode.conf at startup (see
                           also self.glimpseservers)
         """
-        PgefRegistry.__init__(self)
-        self.glimpseservers = {'Alert' : '25000'}
         # TODO:  get glimpseservers info from PGER configuration
         # ... until then, the NARS glimpseserver is temporarily
         # hard-coded ...
+        self.glimpseservers = {'Alert' : '25000'}
+        # TODO:  make this into a module, combining it with
+        # p.utils.registry and making repository interface
+        # initialization dependent on configuration.
+        # Meanwhile, hard-code bindings to registry attrs:
+        self.onto_class_names = registry.onto_class_names
+        self.pgef_class_names = registry.pgef_class_names
+        self.pgef_classes = registry.pgef_classes
+        self.deps_order = registry.deps_order
+        self.addOntoClass = registry.addOntoClass
         self.dbname = dbname
         # first get all table names in pgerdb ...
         conn = PgSQL.connect(database=dbname)

Index: PanGalactic/pangalactic/utils/factory.py
diff -u PanGalactic/pangalactic/utils/factory.py:1.28 PanGalactic/pangalactic/utils/factory.py:1.29
--- PanGalactic/pangalactic/utils/factory.py:1.28	Mon Mar 22 16:14:50 2004
+++ PanGalactic/pangalactic/utils/factory.py	Mon Apr 19 14:25:42 2004
@@ -1,19 +1,19 @@
-# $Id: factory.py,v 1.28 2004/03/22 21:14:50 pbear Exp $
+# $Id: factory.py,v 1.29 2004/04/19 18:25:42 waterbug Exp $
 
 """
 Functions to extract persistable data from
 L{pangalactic.enterprise} objects.
-@version: $Revision: 1.28 $
+@version: $Revision: 1.29 $
 """
 
-__version__ = "$Revision: 1.28 $"[11:-2]
+__version__ = "$Revision: 1.29 $"[11:-2]
 
 import types
 import string
 from pprint import pprint
 from mx.DateTime.ISO import ParseDateTime
 from pangalactic.utils import utils
-from pangalactic.utils.registry import PgefRegistry
+from pangalactic.utils import registry
 
 class PgefFactory:
     """
@@ -21,9 +21,6 @@
     L{pangalactic.enterprise} objects and to reconstitute objects
     from data.
     """
-    def __init__(self):
-        self._registry = PgefRegistry()
-
     def cook(self, attr, datatype):
         """
         Convert an attribute to a string or an int in preparation for
@@ -209,7 +206,7 @@
         """
         # print 'remember:  extract = %s' % str(e)
         # print 'remember:  objs = %s' % str(objs)
-        klass = self._registry.pgef_classes[e['pgef_class']]
+        klass = registry.pgef_classes[e['pgef_class']]
         # MAPPED CLASSES GOING AWAY FOR NOW!
         # if klass is a mapped class (i.e. has a non-empty
         # '_contains' attribute), call rememberMapped()
@@ -286,7 +283,7 @@
                  lists that were passed in, since there may be
                  overlaps and rememberAll will unique them.)
         """
-        pgefclasses = self._registry.pgef_classes
+        pgefclasses = registry.pgef_classes
         remembered = [] # instances that have been remembered
         # print 'rememberAll:  extracts = %s' % str(extracts)
         # print 'rememberAll:  objs = %s' % str(objs)
@@ -303,7 +300,7 @@
         # make sure cnames lists the classes in the order of
         # their dependencies
         depsord = []
-        for cn in self._registry.deps_order:
+        for cn in registry.deps_order:
             if cn in cnames:
                 depsord.append(cn)
         cnames = depsord
@@ -333,7 +330,7 @@
         return remembered, objs
 
     def getDependencyOrder(self):
-        return self._registry.deps_order
+        return registry.deps_order
     
     def rememberMapped(self, e, objs=[]):
         # TODO:  this needs a total rewrite!
@@ -366,7 +363,7 @@
                 the passed-in objects ('objs') plus all the
                 remembered objects.
         """
-        pgef_classes = self._registry.pgef_classes
+        pgef_classes = registry.pgef_classes
         mappedclass = pgef_classes[e['pgef_class']]
         # print 'rememberMapped:  mapped class is', mappedclass
         # create a list of extracts of the view's "internal"
@@ -428,9 +425,6 @@
         return remembered, objs
 
 
-    def make(self, onto_class):
-        tmp = self._registry.onto_classes[onto_class]
-        foo = self._registry.pgef_classes[tmp[pgef_class]](tmp[onto_class])
-        return foo
-
-    
+    def make(self, oclass):
+        pass
+ 

Index: PanGalactic/pangalactic/utils/registry.py
diff -u PanGalactic/pangalactic/utils/registry.py:1.14 PanGalactic/pangalactic/utils/registry.py:1.15
--- PanGalactic/pangalactic/utils/registry.py:1.14	Wed Mar 17 15:52:15 2004
+++ PanGalactic/pangalactic/utils/registry.py	Mon Apr 19 14:25:42 2004
@@ -1,11 +1,53 @@
-# $Id: registry.py,v 1.14 2004/03/17 20:52:15 pbear Exp $
+# $Id: registry.py,v 1.15 2004/04/19 18:25:42 waterbug Exp $
 
 """
 Pan Galactic Engineering Framework Object Registry
-@version: $Revision: 1.14 $
+@version: $Revision: 1.15 $
+
+I maintain a set of dictionaries used by the PgefFactory to
+build objects from serialized data.
+
+The registry and the factory assume that some conventions
+will be followed: 
+
+  1.  For PGEF enterprise objects (subclasses of PgefObject
+      in pangalactic.enterprise), the module name must be the
+      object name in lower-case.
+
+  2.  Any PgefObject that contains references to other
+      PgefObjects (i.e., has attributes that are other
+      PgefObjects) must have a _refs attribute that
+      is a dictionary of the form { attrname : classname }
+      where attrname is the attribute name and classname is
+      the name of the pger_class that it references.  (Any
+      subtype of PgefObject will inherit an empty _refs
+      attribute.)
+
+@var pgef_classes:
+    A list of the Pgef Enterprise names known to the registry
+    (I.e., the ones whose modules are in pangalactic.enterprise)
+@type pgef_classes: list
+
+@var onto_classes:
+    A list of the OntoClass names known to the registry
+@type onto_classes: list
+
+@var pgef_classes:
+    A mapping of PGEF enterprise class names to their class
+    objects
+@type pgef_classes: dict
+
+@var deps_order:
+    A list of all class names in pgef_classes in the
+    order of their dependencies, used by the
+    rememberAll() method of
+    L{pangalactic.utils.factory.PgefFactory}
+    to determine the order in which a collection of
+    serialized objects will be deserialized.
+@type deps_order: list
 """
  
-__version__ = "$Revision: 1.14 $"[11:-2]
+__version__ = "$Revision: 1.15 $"[11:-2]
 
 import string
 from sets import Set
@@ -21,158 +63,78 @@
         classobj = getattr(mod, classname)
     return classobj
 
-class PgefRegistry:
-    """
-    I maintain a set of dictionaries used by the PgefFactory to
-    build objects from data sets.
+pgef_class_names = [
+    'Acu',
+    'Dcu',
+    'DocPtRel',
+    'Document',
+    'Model',
+    'OntoClass',
+    'OntoProperty',
+    'Organization',
+    'Part',
+    'PartsList',
+    'Person',
+    'PgefFile',
+    'PgefObject',
+    'Project',
+    'Role',
+    'VersionedObject']
+
+# initialize pgef_classes
+pgef_classes = {}
+pkg = 'pangalactic.enterprise'
+for cname in pgef_class_names:
+    modname = cname.lower()
+    modpath = pkg + '.' + modname
+    classobj = _import(modpath, cname)
+    pgef_classes[cname] = classobj
+
+# Eventually, the registry should find PGEF application
+# ontologies by some process of "ontology discovery" that should
+# accomodate a number of different methods such as DNS, RDF, OWL,
+# XMI, etc. ....  For now, this is hard-coded; the next step
+# should be to use configuration parameters if they are set; then
+# "distributed ontology discovery".
+onto_class_names = [
+    'PgefAdvisory',
+    'GidepAlert',
+    'GidepFediDoc',
+    'GidepProblemAdvisory',
+    'NasaAdvisory']
+
+# build deps_order
+# (for now, this only includes true classes)
+# TODO:  implement handling for inheritance and dependencies
+# among OntoClasses.
+deps_order = []
+todo = pgef_classes.copy()
+todocns = todo.keys()[:]
+for cn in todocns:
+    if not todo[cn]._refs:
+        deps_order.append(cn)
+        del todo[cn]
+# print 'Got independent classes: '
+# print deps_order
+while 1:
+    depcns = deps_order[:]
+    todocns = todo.keys()[:]
+    for cn in todocns:
+        refcns = todo[cn]._refs.values()
+        if Set(refcns) <= Set(depcns):
+            deps_order.append(cn)
+            del todo[cn]
+    if not todo:
+        # print 'Got dependency order:'
+        # print deps_order
+        break
 
-    The registry and the factory assume that some conventions
-    will be followed: 
-    
-      1.  For PGEF enterprise objects (subclasses of PgefObject
-          in pangalactic.enterprise), the module name must be the
-          object name in lower-case.
-
-      2.  Any PgefObject that contains references to other
-          PgefObjects (i.e., has attributes that are other
-          PgefObjects) must have a _refs attribute that
-          is a dictionary of the form { attrname : classname }
-          where attrname is the attribute name and classname is
-          the name of the pger_class that it references.  (Any
-          subtype of PgefObject will inherit an empty _refs
-          attribute.)
-
-    @cvar _pgef_pkg_names:
-        A list of the PGEF enterprise object packages.
-
-    @cvar _pgef_class_names:
-        A dictionary cross-referencing PGEF enterprise object
-        packages to the PGEF class names they contain.
-            - key   = PGEF package name
-            - value = list of class names
-
-    @cvar _onto_class_names:
-        A dictionary cross-referencing PGEF enterprise object
-        packages to the PGEF class names they contain.
-            - key   = application ontology name
-            - value = list of onto_class names
+def addOntoClass(name):
     """
-
-    # The enterprise packages for PGEF can be made configurable,
-    # but it would be overkill at this point.
-    _pgef_pkg_names = [
-        'pangalactic.enterprise',
-        'pangalactic.enterprise.workflow']
-    _pgef_class_names = {
-        'pangalactic.enterprise' :
-            ['Acu',
-             'Dcu',
-             'DocPtRel',
-             'Document',
-             'Model',
-             'OntoClass',
-             'OntoProperty',
-             'Organization',
-             'Part',
-             'PartsList',
-             'Person',
-             'PgefFile',
-             'PgefObject',
-             'Project',
-             'Role',
-             'VersionedObject'],
-        'pangalactic.enterprise.workflow' :
-            ['WfActivity',
-             'WfEntity',
-             'WfEventAudit',
-             'WfExecutionObject',
-             'WfProcess']
-        }
-    # The application enterprise packages should be derivable
-    # from some type of "ontology discovery", which should
-    # accomodate a number of different methods such as DNS, RDF,
-    # OWL, etc. ... for now, this is hard-coded, and the next
-    # step should be to use configuration parameters if they are
-    # set; then "distributed ontology discovery" ... but bear in
-    # mind that onto_classes in the registry represent application
-    # objects, so for now, some Python objects that can be
-    # initialized by the registry have to exist somewhere.
-    _onto_pkg_names = [
-        'nars.enterprise']
-    _onto_class_names = {
-        'nars.enterprise' :
-            ['PgefAdvisory',
-             'GidepAlert',
-             'GidepFediDoc',
-             'GidepProblemAdvisory',
-             'NasaAdvisory']
-        }
-
-
-    def __init__(self, 
-                 pkg_names=_pgef_pkg_names,
-                 class_names=_pgef_class_names,
-                 onto_pkg_names=_onto_pkg_names,
-                 onto_class_names=_onto_class_names):
-        """
-        PanGalacticRegistry initialization.
-
-        @ivar pgef_classes:
-            A dictionary containing instances of all PGEF class
-            objects that are persistable.  When the registry
-            initializes, it populates this dictionary by importing
-            all classes named in _pgef_class_names.
-                - key   = class name
-                - value = class object
-
-        @ivar deps_order:
-            A list of all class names in pgef_classes in the
-            order of their dependencies, used by the
-            rememberAll() method of
-            L{pangalactic.utils.factory.PgefFactory}
-            to determine the order in which a collection of
-            serialized objects will be deserialized.
-        """
-        # build pgef_classes
-        self.pgef_classes = {}
-        for pkgname in pkg_names:
-            for oname in class_names[pkgname]:
-                modname = oname.lower()
-                modpath = pkgname + '.' + modname
-                classobj = _import(modpath, oname)
-                self.pgef_classes[oname] = classobj
-        # build deps_order
-        self.deps_order = []
-        todo = self.pgef_classes.copy()
-        todocns = todo.keys()[:]
-        for cn in todocns:
-            if not todo[cn]._refs:
-                self.deps_order.append(cn)
-                del todo[cn]
-        # print 'Got independent classes: '
-        # print self.deps_order
-        while 1:
-            depcns = self.deps_order[:]
-            todocns = todo.keys()[:]
-            for cn in todocns:
-                refcns = todo[cn]._refs.values()
-                if Set(refcns) <= Set(depcns):
-                    self.deps_order.append(cn)
-                    del todo[cn]
-            if not todo:
-                # print 'Got dependency order:'
-                # print self.deps_order
-                break
-        # build onto_classes
-        self.onto_classes = {}
-        try:
-            for ontopkgname in onto_pkg_names:
-                for oname in onto_class_names[ontopkgname]:
-                    modname = oname.lower()
-                    modpath = ontopkgname + '.' + modname
-                    classobj = _import(modpath, oname)
-                    self.onto_classes[oname] = classobj
-        except:
-            print "ontoclass importerror"
-
+    Add a new OntoClass (name) to the registry
+    (When inheritance and dependencies are introduced for
+    OntoClasses, this function will need to recompute deps_order
+    when adding a new OntoClass.)
+    """
+    onto_class_names.append(name)
 

From pbear at ned.gsfc.nasa.gov  Tue Apr 20 13:14:30 2004
From: pbear at ned.gsfc.nasa.gov (pbear CVS)
Date: Tue Apr 20 13:14:32 2004
Subject: [Pangalactic-commits] a few search fixes
Message-ID: <200404201714.i3KHEU74020080@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/client/fnord.py 1.92 1.93
PanGalactic/pangalactic/client/modules/psm/itemsearchform.py 1.20 1.21
PanGalactic/pangalactic/client/modules/psm/itemsearchform.wdr 1.8 1.9
PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py 1.8 1.9
PanGalactic/pangalactic/client/modules/psm/psmtool.py 1.161 1.162
PanGalactic/pangalactic/client/modules/psm/searchframe.py 1.36 1.37
PanGalactic/pangalactic/utils/datamanager.py 1.96 1.97
PanGalactic/pangalactic/utils/localdb.py 1.78 1.79
PanGalactic/pangalactic/utils/xmlrpcinterface.py 1.49 1.50

Log message:
a few search fixes


Index: PanGalactic/pangalactic/utils/localdb.py
diff -u PanGalactic/pangalactic/utils/localdb.py:1.78 PanGalactic/pangalactic/utils/localdb.py:1.79
--- PanGalactic/pangalactic/utils/localdb.py:1.78	Fri Apr 16 14:32:59 2004
+++ PanGalactic/pangalactic/utils/localdb.py	Tue Apr 20 13:14:28 2004
@@ -125,6 +125,10 @@
                       MODEL,
                       PART,
                       PARTSLIST,
+                      NASAADVISORY,
+                      GIDEPALERT,
+                      GIDEPPROBLEMADVISORY,
+                      NASAIMPACTSTATEMENT,
                       PGEFFILE,
                       PROJECT,
                       WFACTIVITY,

Index: PanGalactic/pangalactic/utils/datamanager.py
diff -u PanGalactic/pangalactic/utils/datamanager.py:1.96 PanGalactic/pangalactic/utils/datamanager.py:1.97
--- PanGalactic/pangalactic/utils/datamanager.py:1.96	Fri Apr 16 14:32:58 2004
+++ PanGalactic/pangalactic/utils/datamanager.py	Tue Apr 20 13:14:28 2004
@@ -1,6 +1,6 @@
 # $Source: /repo/step_testbed/PanGalactic/pangalactic/utils/datamanager.py,v $
 
-__version__ = "$Revision: 1.96 $"[11:-2]
+__version__ = "$Revision: 1.97 $"[11:-2]
 
 
 import time
@@ -740,6 +740,7 @@
         print "datamanager.search", classattrdict
         objs_to_hookup = self.localDB.getCommittedObjects()
         self.searchresults = self.server.search(classattrdict, objs_to_hookup)
+        print "# results", len(self.searchresults)
 
 
     def getSearchResults(self):

Index: PanGalactic/pangalactic/client/fnord.py
diff -u PanGalactic/pangalactic/client/fnord.py:1.92 PanGalactic/pangalactic/client/fnord.py:1.93
--- PanGalactic/pangalactic/client/fnord.py:1.92	Wed Apr 14 16:48:25 2004
+++ PanGalactic/pangalactic/client/fnord.py	Tue Apr 20 13:14:27 2004
@@ -1,13 +1,13 @@
 #!/usr/bin/env python 
 
-# $Id: fnord.py,v 1.92 2004/04/14 20:48:25 pbear Exp $
+# $Id: fnord.py,v 1.93 2004/04/20 17:14:27 pbear Exp $
 
 """
 Main application module for the PGEF desktop client.
 
-@version: $Revision: 1.92 $
+@version: $Revision: 1.93 $
 """
-__version__ = "$Revision: 1.92 $"[11:-2]
+__version__ = "$Revision: 1.93 $"[11:-2]
 
 from wxPython.wx import *
 from wxPython.grid import *
@@ -373,6 +373,11 @@
         self.menuBar.Append(menu, "&File")
 
         menu = wxMenu()
+        menu.Append(ID_TOOL_SEARCH, "&Search...", "Search the database")
+        menu.Enable(ID_TOOL_SEARCH, False)        
+        menu.Append(ID_TOOL_DBBROWSER, "&Browse Local Database...", "Browse the local database dictionaries")
+        menu.AppendSeparator()
+
         docmenu = wxMenu()
         docmenu.Append(ID_TOOL_DOC_NEW, "&New...", "New Document")
         docmenu.Append(ID_TOOL_DOC_EDIT, "&Edit...", "Edit Document")
@@ -384,11 +389,6 @@
         plmenu.Append(ID_TOOL_PL_EDIT, "&Edit...", "Edit Parts List")
         plmenu.Append(ID_TOOL_PL_VIEW, "&View...", "View Parts List")
         menu.AppendMenu(ID_TOOL_PARTSLISTS, '&Parts Lists', plmenu)
-        menu.AppendSeparator()
-
-        menu.Append(ID_TOOL_SEARCH, "&Search...", "Search the database")
-        menu.Enable(ID_TOOL_SEARCH, False)        
-        menu.Append(ID_TOOL_DBBROWSER, "&Browse Local Database...", "Browse the local database dictionaries")
         self.menuBar.Append(menu, "&Tools")
 
         menu = wxMenu()
@@ -664,6 +664,7 @@
                 self.SearchFrame.CentreOnParent()
                 self.SearchFrame.Show(True)
                 EVT_CLOSE(self.SearchFrame, self.CloseSearchFrame)
+                EVT_BUTTON(self.SearchFrame, self.SearchFrame.getCloseWgt().GetId(), self.CloseSearchFrame)
                 self.SearchFrame.GetMyStuff()
             else:                
                 self.SearchFrame.GetMyStuff()

Index: PanGalactic/pangalactic/client/modules/psm/itemsearchform.py
diff -u PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.20 PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.21
--- PanGalactic/pangalactic/client/modules/psm/itemsearchform.py:1.20	Wed Apr  7 12:11:50 2004
+++ PanGalactic/pangalactic/client/modules/psm/itemsearchform.py	Tue Apr 20 13:14:28 2004
@@ -34,6 +34,9 @@
         EVT_CHECKBOX(self, SEARCHPL_CHECKBOX, self.OnCheckPL)
         EVT_CHECKBOX(self, SEARCHDOC_CHECKBOX, self.OnCheckDoc)
 
+    def getCloseWgt(self):
+        return wxPyTypeCast(self.FindWindowById(CLOSE_BUTTON), "wxButton" )
+
 
     def GetSearchWgt(self):
         return wxPyTypeCast(self.FindWindowById(SEARCH_BUTTON), "wxButton" )
@@ -93,7 +96,7 @@
         return wxPyTypeCast(self.FindWindowById(SEARCHVERSION_RADIOBOX), "wxRadioBox")
 
     def GetRevisionWgt(self):
-        return wxPyTypeCast(self.FindWindowById(REVISION_LABEL), "wxTextCtrl")
+        return wxPyTypeCast(self.FindWindowById(SEARCH_REVISION), "wxTextCtrl")
 
     def GetPLTypeLabel(self):
         return wxPyTypeCast(self.FindWindowById(PLTYPE_LABEL), "wxStaticText")
@@ -125,7 +128,6 @@
     def GetRevisionLabel(self):
         return wxPyTypeCast(self.FindWindowById(REVISION_LABEL), "wxStaticText")
 
-
     def OnCheckPart(self, event = None):
         wgt = self.GetPartFlagWgt()
         self.GetPartNameLabel().Enable(wgt.GetValue())
@@ -178,7 +180,7 @@
         fields = []
         fieldlist = []
 
-        # the list of fields to check
+        # the list of fields to check: (classname, attrname, value [, oper])
         fields.append(("all",       "owner_oid",    self.GetPOCWgt().GetValue()))
         fields.append(("all",       "creator_oid",  self.GetAuthorWgt().GetValue()))
         fields.append(("Part",      "id",           self.GetPartNameWgt().GetValue()))

Index: PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py
diff -u PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.8 PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.9
--- PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py:1.8	Wed Apr  7 12:11:50 2004
+++ PanGalactic/pangalactic/client/modules/psm/itemsearchform_wdr.py	Tue Apr 20 13:14:28 2004
@@ -26,6 +26,7 @@
 SEARCH_BUTTON = wxNewId()
 ADVSEARCH_BUTTON = wxNewId()
 CLEAR_BUTTON = wxNewId()
+CLOSE_BUTTON = wxNewId()
 PARTNAME_LABEL = wxNewId()
 SEARCH_PARTNAME = wxNewId()
 PARTDESC_LABEL = wxNewId()
@@ -117,10 +118,12 @@
 
     item1.AddSizer( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item21 = wxFlexGridSizer( 1, 0, 0, 0 )
+    item21 = wxFlexGridSizer( 2, 0, 0, 0 )
     item21.AddGrowableCol( 0 )
     item21.AddGrowableCol( 1 )
     item21.AddGrowableCol( 2 )
+    item21.AddGrowableRow( 0 )
+    item21.AddGrowableRow( 1 )
     
     item22 = wxButton( parent, SEARCH_BUTTON, "Search", wxDefaultPosition, wxDefaultSize, 0 )
     item22.SetToolTip( wxToolTip("Initiate the search using the specified criteria") )
@@ -133,115 +136,122 @@
     item24.SetToolTip( wxToolTip("Clear the search fields") )
     item21.AddWindow( item24, 0, wxALIGN_CENTER|wxALL, 5 )
 
+    item21.AddSpacer( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 )
+
+    item25 = wxButton( parent, CLOSE_BUTTON, "Close", wxDefaultPosition, wxDefaultSize, 0 )
+    item21.AddWindow( item25, 0, wxALIGN_CENTER|wxALL, 5 )
+
+    item21.AddSpacer( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 )
+
     item1.AddSizer( item21, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 35 )
 
     item0.AddSizer( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item25 = wxFlexGridSizer( 0, 1, 0, 0 )
+    item26 = wxFlexGridSizer( 0, 1, 0, 0 )
     
-    item27 = wxStaticBox( parent, -1, "Parts" )
-    item26 = wxStaticBoxSizer( item27, wxVERTICAL )
+    item28 = wxStaticBox( parent, -1, "Parts" )
+    item27 = wxStaticBoxSizer( item28, wxVERTICAL )
     
-    item28 = wxFlexGridSizer( 0, 2, 0, 0 )
-    item28.AddGrowableCol( 1 )
+    item29 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item29.AddGrowableCol( 1 )
     
-    item29 = wxStaticText( parent, PARTNAME_LABEL, "Name", wxDefaultPosition, wxDefaultSize, 0 )
-    item28.AddWindow( item29, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item30 = wxStaticText( parent, PARTNAME_LABEL, "Name", wxDefaultPosition, wxDefaultSize, 0 )
+    item29.AddWindow( item30, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item30 = wxTextCtrl( parent, SEARCH_PARTNAME, "", wxDefaultPosition, wxDefaultSize, 0 )
-    item30.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
-    item30.Enable(False)
-    item28.AddWindow( item30, 0, wxALIGN_CENTER_VERTICAL, 5 )
+    item31 = wxTextCtrl( parent, SEARCH_PARTNAME, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item31.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
+    item31.Enable(False)
+    item29.AddWindow( item31, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item31 = wxStaticText( parent, PARTDESC_LABEL, "Description", wxDefaultPosition, wxDefaultSize, 0 )
-    item28.AddWindow( item31, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item32 = wxStaticText( parent, PARTDESC_LABEL, "Description", wxDefaultPosition, wxDefaultSize, 0 )
+    item29.AddWindow( item32, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item32 = wxTextCtrl( parent, SEARCH_PARTDESC, "", wxDefaultPosition, wxDefaultSize, 0 )
-    item28.AddWindow( item32, 0, wxALIGN_CENTER_VERTICAL, 5 )
+    item33 = wxTextCtrl( parent, SEARCH_PARTDESC, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item29.AddWindow( item33, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item26.AddSizer( item28, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
+    item27.AddSizer( item29, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
 
-    item25.AddSizer( item26, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+    item26.AddSizer( item27, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
 
-    item34 = wxStaticBox( parent, -1, "Models" )
-    item33 = wxStaticBoxSizer( item34, wxVERTICAL )
+    item35 = wxStaticBox( parent, -1, "Models" )
+    item34 = wxStaticBoxSizer( item35, wxVERTICAL )
     
-    item35 = wxFlexGridSizer( 0, 2, 0, 0 )
-    item35.AddGrowableCol( 1 )
+    item36 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item36.AddGrowableCol( 1 )
     
-    item36 = wxStaticText( parent, MODELNAME_LABEL, "Name", wxDefaultPosition, wxDefaultSize, 0 )
-    item35.AddWindow( item36, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item37 = wxStaticText( parent, MODELNAME_LABEL, "Name", wxDefaultPosition, wxDefaultSize, 0 )
+    item36.AddWindow( item37, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item37 = wxTextCtrl( parent, SEARCH_MODELNAME, "", wxDefaultPosition, wxDefaultSize, 0 )
-    item37.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
-    item37.Enable(False)
-    item35.AddWindow( item37, 0, wxALIGN_CENTER_VERTICAL, 5 )
+    item38 = wxTextCtrl( parent, SEARCH_MODELNAME, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item38.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
+    item38.Enable(False)
+    item36.AddWindow( item38, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item38 = wxStaticText( parent, MODELDESC_LABEL, "Description", wxDefaultPosition, wxDefaultSize, 0 )
-    item35.AddWindow( item38, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item39 = wxStaticText( parent, MODELDESC_LABEL, "Description", wxDefaultPosition, wxDefaultSize, 0 )
+    item36.AddWindow( item39, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item39 = wxTextCtrl( parent, SEARCH_MODELDESC, "", wxDefaultPosition, wxDefaultSize, 0 )
-    item35.AddWindow( item39, 0, wxALIGN_CENTER_VERTICAL, 5 )
+    item40 = wxTextCtrl( parent, SEARCH_MODELDESC, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item36.AddWindow( item40, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item33.AddSizer( item35, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
+    item34.AddSizer( item36, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
 
-    item25.AddSizer( item33, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+    item26.AddSizer( item34, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
 
-    item41 = wxStaticBox( parent, -1, "Parts Lists" )
-    item40 = wxStaticBoxSizer( item41, wxVERTICAL )
+    item42 = wxStaticBox( parent, -1, "Parts Lists" )
+    item41 = wxStaticBoxSizer( item42, wxVERTICAL )
     
-    item42 = wxFlexGridSizer( 0, 2, 0, 0 )
-    item42.AddGrowableCol( 1 )
+    item43 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item43.AddGrowableCol( 1 )
     
-    item43 = wxStaticText( parent, CATEGORY_LABEL, "Category", wxDefaultPosition, wxDefaultSize, 0 )
-    item42.AddWindow( item43, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item44 = wxStaticText( parent, CATEGORY_LABEL, "Category", wxDefaultPosition, wxDefaultSize, 0 )
+    item43.AddWindow( item44, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item44 = wxTextCtrl( parent, SEARCH_CATEGORY, "", wxDefaultPosition, wxDefaultSize, 0 )
-    item44.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
-    item44.Enable(False)
-    item42.AddWindow( item44, 0, wxALIGN_CENTER_VERTICAL, 5 )
+    item45 = wxTextCtrl( parent, SEARCH_CATEGORY, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item45.SetToolTip( wxToolTip("Specify all or part of a component name as part of the search criteria") )
+    item45.Enable(False)
+    item43.AddWindow( item45, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item45 = wxStaticText( parent, PLTYPE_LABEL, "Type", wxDefaultPosition, wxDefaultSize, 0 )
-    item42.AddWindow( item45, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item46 = wxStaticText( parent, PLTYPE_LABEL, "Type", wxDefaultPosition, wxDefaultSize, 0 )
+    item43.AddWindow( item46, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item46 = wxComboBox( parent, SEARCH_PLTYPE, "", wxDefaultPosition, wxDefaultSize, 
+    item47 = wxComboBox( parent, SEARCH_PLTYPE, "", wxDefaultPosition, wxDefaultSize, 
         ["Any","Antenna","Assembly","Board","Bus","Downlink","Harness","Instrument","LRU","Power","Software","Spacecraft","System","Unit"] , wxCB_DROPDOWN )
-    item46.SetToolTip( wxToolTip("Specify a component type as part of the search criteria") )
-    item46.Enable(False)
-    item42.AddWindow( item46, 0, wxALIGN_CENTER_VERTICAL, 5 )
+    item47.SetToolTip( wxToolTip("Specify a component type as part of the search criteria") )
+    item47.Enable(False)
+    item43.AddWindow( item47, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item40.AddSizer( item42, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
+    item41.AddSizer( item43, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 )
 
-    item25.AddSizer( item40, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+    item26.AddSizer( item41, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
 
-    item48 = wxStaticBox( parent, -1, "Documents" )
-    item47 = wxStaticBoxSizer( item48, wxVERTICAL )
+    item49 = wxStaticBox( parent, -1, "Documents" )
+    item48 = wxStaticBoxSizer( item49, wxVERTICAL )
     
-    item49 = wxFlexGridSizer( 0, 2, 0, 0 )
-    item49.AddGrowableCol( 1 )
+    item50 = wxFlexGridSizer( 0, 2, 0, 0 )
+    item50.AddGrowableCol( 1 )
     
-    item50 = wxStaticText( parent, TITLE_LABEL, "Title", wxDefaultPosition, wxDefaultSize, 0 )
-    item49.AddWindow( item50, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item51 = wxStaticText( parent, TITLE_LABEL, "Title", wxDefaultPosition, wxDefaultSize, 0 )
+    item50.AddWindow( item51, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item51 = wxTextCtrl( parent, SEARCH_DOCTITLE, "", wxDefaultPosition, wxDefaultSize, 0 )
-    item51.SetToolTip( wxToolTip("Specify all or part of a drawing number as part of the search criteria") )
-    item51.Enable(False)
-    item49.AddWindow( item51, 0, wxALIGN_CENTER_VERTICAL, 5 )
+    item52 = wxTextCtrl( parent, SEARCH_DOCTITLE, "", wxDefaultPosition, wxDefaultSize, 0 )
+    item52.SetToolTip( wxToolTip("Specify all or part of a drawing number as part of the search criteria") )
+    item52.Enable(False)
+    item50.AddWindow( item52, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item52 = wxStaticText( parent, DOCTYPE_LABEL, "Type", wxDefaultPosition, wxDefaultSize, 0 )
-    item49.AddWindow( item52, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
+    item53 = wxStaticText( parent, DOCTYPE_LABEL, "Type", wxDefaultPosition, wxDefaultSize, 0 )
+    item50.AddWindow( item53, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
 
-    item53 = wxComboBox( parent, SEARCH_DOCTYPE, "", wxDefaultPosition, wxDefaultSize, 
+    item54 = wxComboBox( parent, SEARCH_DOCTYPE, "", wxDefaultPosition, wxDefaultSize, 
         ["Any","Antenna","Assembly","Board","Bus","Downlink","Harness","Instrument","LRU","Power","Software","Spacecraft","System","Unit"] , wxCB_DROPDOWN )
-    item53.SetToolTip( wxToolTip("Specify a component type as part of the search criteria") )
-    item53.Enable(False)
-    item49.AddWindow( item53, 0, wxALIGN_CENTER_VERTICAL, 5 )
+    item54.SetToolTip( wxToolTip("Specify a component type as part of the search criteria") )
+    item54.Enable(False)
+    item50.AddWindow( item54, 0, wxALIGN_CENTER_VERTICAL, 5 )
 
-    item47.AddSizer( item49, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 )
+    item48.AddSizer( item50, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 )
 
-    item25.AddSizer( item47, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
+    item26.AddSizer( item48, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 )
 
-    item0.AddSizer( item25, 0, wxGROW, 5 )
+    item0.AddSizer( item26, 0, wxGROW, 5 )
 
     if set_sizer == True:
         parent.SetAutoLayout( True )

Index: PanGalactic/pangalactic/client/modules/psm/searchframe.py
diff -u PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.36 PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.37
--- PanGalactic/pangalactic/client/modules/psm/searchframe.py:1.36	Fri Apr 16 14:32:56 2004
+++ PanGalactic/pangalactic/client/modules/psm/searchframe.py	Tue Apr 20 13:14:28 2004
@@ -103,6 +103,9 @@
         EVT_MENU(self,self.SEARCH_GETMYSTUFF, self.GetMyStuff)
         
 
+    def getCloseWgt(self):
+        return self.searchform.getCloseWgt()
+
 
     def fillResultGrid(self, searchresults, grid, gridname):
         """
@@ -166,65 +169,6 @@
             self.summarygrid.GetParent().SetSelection(self.ResultsPage) 
 
 
-##    def fillResultGrids(self, searchresults):
-##        """
-##        Fill in the grid displays with the results of the search.
-##        Put each object in the appropriate grid.
-##        """
-##        partndx = 0
-##        self.partgrid.BeginBatch()
-##        self.partgrid.ClearGrid()
-
-##        modelndx = 0
-##        self.modelgrid.BeginBatch()
-##        self.modelgrid.ClearGrid()
-
-##        docndx = 0
-##        self.docgrid.BeginBatch()
-##        self.docgrid.ClearGrid()
-
-##        for item in searchresults:
-##            classname = item.__class__.__name__
-##            if classname == "Part":
-##                self.partgrid.AddData(item)
-##                partndx += 1
-##            elif classname == "Model":
-##                self.modelgrid.AddData(item)
-##                modelndx += 1
-##            elif classname == "Document":
-##                self.docgrid.AddData(item)
-##                docndx += 1
-
-##        self.partgrid.EndBatch()
-##        self.modelgrid.EndBatch()
-##        self.docgrid.EndBatch()
-        
-##        if partndx + modelndx + docndx > 0:
-##            # select the search results tab 
-##            self.summarygrid.BeginBatch()
-##            self.summarygrid.ClearGrid()
-##            rowndx = 0
-##            if partndx > 0:
-##                self.summarygrid.AppendRows(1)
-##                self.summarygrid.SetCellValue(rowndx, 0, "Part")
-##                self.summarygrid.SetCellValue(rowndx, 1, str(partndx))
-##                rowndx += 1
-
-##            if modelndx > 0:
-##                self.summarygrid.AppendRows(1)
-##                self.summarygrid.SetCellValue(rowndx, 0, "Model")
-##                self.summarygrid.SetCellValue(rowndx, 1, str(modelndx))
-##                rowndx += 1
-
-##            if docndx > 0:
-##                self.summarygrid.AppendRows(1)
-##                self.summarygrid.SetCellValue(rowndx, 0, "Document")
-##                self.summarygrid.SetCellValue(rowndx, 1, str(docndx))
-##                rowndx += 1
-
-##            self.summarygrid.EndBatch()
-##            self.summarygrid.AutoSizeColumns()
-##            self.summarygrid.GetParent().SetSelection(self.ResultsPage) 
 
     def onSearch(self, event):
         """

Index: PanGalactic/pangalactic/client/modules/psm/psmtool.py
diff -u PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.161 PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.162
--- PanGalactic/pangalactic/client/modules/psm/psmtool.py:1.161	Fri Apr 16 14:32:56 2004
+++ PanGalactic/pangalactic/client/modules/psm/psmtool.py	Tue Apr 20 13:14:28 2004
@@ -9,7 +9,7 @@
 This module is the main application code for the pgef client interface
 """
 
-__version__ = "$Revision: 1.161 $"[11:-2]
+__version__ = "$Revision: 1.162 $"[11:-2]
 
 
 import os
@@ -569,6 +569,7 @@
             self.SearchFrame = searchframe.SearchFrame(self, -1, 'Search', datamanager = self.dm)
             self.SearchFrame.CentreOnParent()
             EVT_CLOSE(self.SearchFrame, self.CloseSearchFrame)
+            EVT_BUTTON(self.SearchFrame, self.SearchFrame.getCloseWgt().GetId(), self.CloseSearchFrame)
             self.SearchFrame.Show(True)
 
     def CloseSearchFrame (self, event = None):

Index: PanGalactic/pangalactic/utils/xmlrpcinterface.py
diff -u PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.49 PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.50
--- PanGalactic/pangalactic/utils/xmlrpcinterface.py:1.49	Fri Apr 16 14:32:59 2004
+++ PanGalactic/pangalactic/utils/xmlrpcinterface.py	Tue Apr 20 13:14:28 2004
@@ -3,10 +3,10 @@
 """
 PanGalactic Client XML-RPC Interfaces
 
-@version: $Revision: 1.49 $
+@version: $Revision: 1.50 $
 """
 
-__version__ = "$Revision: 1.49 $"[11:-2]
+__version__ = "$Revision: 1.50 $"[11:-2]
 
 import xmlrpclib
 import types
@@ -252,14 +252,16 @@
         retlist = []
         for classname, attrlist in class_attr_dict.items():
             objlist = []
-            print " ", classname, attrlist
+            print "  ", classname, attrlist
             # do not get back referenced objects for now (first 0/1)
             # do get back subtypes (second 0/1)
+            if len(attrlist) == 0:
+                continue
             data = self._RPC.search(classname, 0, 1, attrlist)
             if data:
-#                print "have data", len(data)
-#                for d in data:
-#                    print d["id"], d["short_description"], d["onto_class"]
+                print "#data", len(data)
+                for d in data:
+                    print d["id"], d["short_description"], d["onto_class"]
                 objlist, localobjs = self._factory.rememberAll(data, localobjs)
 #                print "len objlist", len(objlist)
 #                print "len localobjs", len(localobjs)

From waterbug at ned.gsfc.nasa.gov  Wed Apr 28 14:46:44 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Wed Apr 28 14:46:46 2004
Subject: [Pangalactic-commits] Property -> OntoProperty
Message-ID: <200404281846.i3SIki1V027010@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/enterprise/ontoclass.py 1.3 1.4
PanGalactic/pangalactic/enterprise/ontoproperty.py 1.3 1.4
PanGalactic/pangalactic/enterprise/property.py 1.9 None

Log message:
Property -> OntoProperty
OntoProperty and OntoClass are enterprise classes. There will now
be a "meta" package with Schema, Property, etc., which are used
in the definition of enterprise classes.  The difference between
OntoProperty / OntoClass and their "meta" brethren is that
OntoProperty and OntoClass are managed (and versioned), like other
enterprise objects, but the classes in the meta package are
purely application objects -- what PEAK refers to as "Features".
Part of the reason for this distinction is to avoid cyclic
dependencies, but Schema, Property, and the like can still use
data that is managed by OntoProperty and OntoClass instances.
;)


Index: PanGalactic/pangalactic/enterprise/ontoclass.py
diff -u PanGalactic/pangalactic/enterprise/ontoclass.py:1.3 PanGalactic/pangalactic/enterprise/ontoclass.py:1.4
--- PanGalactic/pangalactic/enterprise/ontoclass.py:1.3	Fri Apr 16 14:32:57 2004
+++ PanGalactic/pangalactic/enterprise/ontoclass.py	Wed Apr 28 14:46:42 2004
@@ -1,17 +1,19 @@
-# $Id: ontoclass.py,v 1.3 2004/04/16 18:32:57 pbear Exp $
+# $Id: ontoclass.py,v 1.4 2004/04/28 18:46:42 waterbug Exp $
 
 """
-A synonym for the ontology "Class" concept.
+A synonym for the "class" concept as it is used in ontologies and
+description logics.
 """
 
-__version__ = "$Revision: 1.3 $"[11:-2]
+__version__ = "$Revision: 1.4 $"[11:-2]
 
 from pangalactic.enterprise.project import Project
 from pangalactic.enterprise.versionedobject import VersionedObject
 
 class OntoClass(VersionedObject):
     """
-    A synonym for the ontology "Class" concept.
+    A synonym for the "class" concept as it is used in ontologies
+    and description logics.
     """
     # These are fields that are excluded from copying or
     # comparisions between ProductMaster Objects

Index: PanGalactic/pangalactic/enterprise/ontoproperty.py
diff -u PanGalactic/pangalactic/enterprise/ontoproperty.py:1.3 PanGalactic/pangalactic/enterprise/ontoproperty.py:1.4
--- PanGalactic/pangalactic/enterprise/ontoproperty.py:1.3	Fri Apr 16 14:32:57 2004
+++ PanGalactic/pangalactic/enterprise/ontoproperty.py	Wed Apr 28 14:46:42 2004
@@ -1,4 +1,4 @@
-# $Id: ontoproperty.py,v 1.3 2004/04/16 18:32:57 pbear Exp $
+# $Id: ontoproperty.py,v 1.4 2004/04/28 18:46:42 waterbug Exp $
 
 """
 An attribute whose definition can be managed.
@@ -30,7 +30,10 @@
     _excluded_dump = []
     _fk = {}
     _default_display_order = ["id", "id_context", "name", "long_description"]
-    _default_display_names = {"id": "ID", "id_context": "Context", "name": "Name", "long_description": "Definition"}
+    _default_display_names = {"id": "ID",
+                              "id_context": "Context",
+                              "name": "Name",
+                              "long_description": "Definition"}
     _properties = {}
     _required = []
     _refs = {}

From waterbug at ned.gsfc.nasa.gov  Wed Apr 28 17:36:48 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Wed Apr 28 17:36:51 2004
Subject: [Pangalactic-commits] Directory
	/repo/step_testbed/PanGalactic/pangalactic/meta added to the
	repository
Message-ID: <200404282136.i3SLamra029166@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/pangalactic/meta

Log message:
Directory /repo/step_testbed/PanGalactic/pangalactic/meta added to the repository


From waterbug at ned.gsfc.nasa.gov  Wed Apr 28 17:38:00 2004
From: waterbug at ned.gsfc.nasa.gov (waterbug CVS)
Date: Wed Apr 28 17:38:01 2004
Subject: [Pangalactic-commits] Docs + "meta" package.
Message-ID: <200404282138.i3SLc0uI029211@ned.gsfc.nasa.gov>

Modified files:
PanGalactic/doc/PgefReference.txt 1.1 1.2
PanGalactic/pangalactic/enterprise/ontoproperty.py 1.4 1.5
PanGalactic/pangalactic/meta/property.py None 1.1
PanGalactic/pangalactic/meta/propertyset.py None 1.1
PanGalactic/pangalactic/meta/schema.py None 1.1

Log message:
Docs + "meta" package.


Index: PanGalactic/doc/PgefReference.txt
diff -u PanGalactic/doc/PgefReference.txt:1.1 PanGalactic/doc/PgefReference.txt:1.2
--- PanGalactic/doc/PgefReference.txt:1.1	Sun Mar 21 23:29:36 2004
+++ PanGalactic/doc/PgefReference.txt	Wed Apr 28 17:37:57 2004
@@ -3,8 +3,8 @@
 ==============
 
 :Author: Stephen Waterbury <stephen.c.waterbury@nasa.gov>
-:Version: $Revision: 1.1 $
-:Date: $Date: 2004/03/22 04:29:36 $
+:Version: $Revision: 1.2 $
+:Date: $Date: 2004/04/28 21:37:57 $
 
 
 ------------
@@ -27,6 +27,42 @@
 -----------------
 
 
+--------------------------------------
+PGEF OID's:  Unique Object Identifiers
+--------------------------------------
+
+Each PGEF application object is assigned a unique identifier, a
+'pgef_oid'.  The preferred form for pgef_oid is a URI, if one is
+available or can be constructed canonically.  Otherwise, an
+arbitrary (but unique) one will be constructed as follows:
+
+`[canonical userid of object creator] + [time-date stamp of creation-time]`
+ 
+where the canonical userid is the user's email address and the
+time-date stamp is in Universal Time.
+ 
+
+----------------------------------------
+PGEF Enterprise Classes and Onto Classes
+----------------------------------------
+
+PGEF Enterprise Classes are the classes of the PGEF base
+ontology, sometimes referred to as domain objects:  "a domain
+object is a logical container of purely domain information, [and]
+usually represents a logical entity in the problem domain space"
+[http://c2.com/cgi/wiki?DomainObject].  PGEF Enterprise Classes
+are actual Python classes, and each PGEF Enterprise Class has a
+corresponding database table whose name is the class name
+converted from StudlyCaps to lower-case underscore-delimited
+format ('studly_caps').
+
+PGEF Onto Classes are also domain objects, but they may or may
+not be Python classes.  They do not have corresponding database
+tables, but are mapped into the table of their parent PGEF
+Enterprise Class, whose name is the value of their 'pgef_class'
+attribute.
+
+
 -----------------------------------
 PGEF Ontology and Repository Schema
 -----------------------------------
@@ -44,22 +80,7 @@
 createPgerDbTables.sql script ]
 
 
---------------------------------------
-PGEF OID's:  Unique Object Identifiers
---------------------------------------
-
-Each PGEF application object is assigned a unique identifier, a
-'pgef_oid'.  The preferred form for pgef_oid is a URI, if one is
-available or can be constructed canonically.  Otherwise, an
-arbitrary (but unique) one will be constructed as follows:
-
-`[canonical userid of object creator] + [time-date stamp of creation-time]`
- 
-where the canonical userid is the user's email address and the
-time-date stamp is in Universal Time.
- 
-
 
 --------
-$Id: PgefReference.txt,v 1.1 2004/03/22 04:29:36 waterbug Exp $
+$Id: PgefReference.txt,v 1.2 2004/04/28 21:37:57 waterbug Exp $
 

Index: PanGalactic/pangalactic/enterprise/ontoproperty.py
diff -u PanGalactic/pangalactic/enterprise/ontoproperty.py:1.4 PanGalactic/pangalactic/enterprise/ontoproperty.py:1.5
--- PanGalactic/pangalactic/enterprise/ontoproperty.py:1.4	Wed Apr 28 14:46:42 2004
+++ PanGalactic/pangalactic/enterprise/ontoproperty.py	Wed Apr 28 17:37:58 2004
@@ -1,8 +1,11 @@
-# $Id: ontoproperty.py,v 1.4 2004/04/28 18:46:42 waterbug Exp $
+# $Id: ontoproperty.py,v 1.5 2004/04/28 21:37:58 waterbug Exp $
 
 """
-An attribute whose definition can be managed.
+An attribute whose definition can be managed and versioned.
 (Essentially synonymous with an RDF or OWL Property.)
+
+OntoProperty supports the use of an active data element
+dictionary in the definition of schemas, views, and maps.
 """
 
 from pangalactic.enterprise.versionedobject import VersionedObject