/[papo]/gnue/forms/src/GFDisplayHandler.py
ViewVC logotype

Diff of /gnue/forms/src/GFDisplayHandler.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5.2.3 by styxman, Wed May 14 23:11:57 2003 UTC revision 1.5.2.4 by apronotti, Wed May 21 18:00:52 2003 UTC
# Line 746  class DropdownDisplayHandler(FieldDispla Line 746  class DropdownDisplayHandler(FieldDispla
746  #  #
747  class TextLookupDisplayHandler(FieldDisplayHandler):  class TextLookupDisplayHandler(FieldDisplayHandler):
748    
   # def __init__(self, *args, **params):  
     # FieldDisplayHandler.__init__(self, *args, **params)  
749    def __init__(self, entry, eventHandler, displayMask, inputMask= None):    def __init__(self, entry, eventHandler, displayMask, inputMask= None):
750      FieldDisplayHandler.__init__(self, entry, eventHandler, None)      FieldDisplayHandler.__init__(self, entry, eventHandler, None)
751      self.displayMask= entry._displaymask      self.displayMask= entry._displaymask
752        self._currentValue = ""
753        self._currentDisplayValue = ""
754    
755    def beginEdit(self, event):    def beginEdit(self, event):
756      pass      pass
# Line 760  class TextLookupDisplayHandler(FieldDisp Line 760  class TextLookupDisplayHandler(FieldDisp
760      # print "hack! %s" % self.entry.name      # print "hack! %s" % self.entry.name
761      if value in (None,""):      if value in (None,""):
762        return ""        return ""
763        if value == self._currentValue:
764          return self._currentDisplayValue
765      descr = ""      descr = ""
766      if hasattr(self.entry,'datasource'):      if hasattr(self.entry,'datasource'):
767        if hasattr(self.entry,'foreign_key'):        if hasattr(self.entry,'foreign_key'):
# Line 782  class TextLookupDisplayHandler(FieldDisp Line 784  class TextLookupDisplayHandler(FieldDisp
784          # print "hack[1]! %s: %s" % (self.entry.name, str(descr))          # print "hack[1]! %s: %s" % (self.entry.name, str(descr))
785        except:        except:
786          pass          pass
787        self._currentValue = value
788        self._currentDisplayValue = descr
789      return descr      return descr
790    
791    def _buildDisplay(self):    def _buildDisplay(self):

Legend:
Removed from v.1.5.2.3  
changed lines
  Added in v.1.5.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26