commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/gnuef samples/zipcode/zip_code.gfd src/GFO...


From: James Thompson
Subject: gnue/gnuef samples/zipcode/zip_code.gfd src/GFO...
Date: Wed, 11 Oct 2000 17:41:04 -0700

CVSROOT:        /cvs
Module name:    gnue
Changes by:     James Thompson <address@hidden> 00/10/11 17:41:04

Modified files:
        gnuef/samples/zipcode: zip_code.gfd 
        gnuef/src      : GFObjects.py 

Log message:
        Very simple master/detail system added

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/samples/zipcode/zip_code.gfd.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFObjects.py.diff?r1=1.16&r2=1.17

Patches:
Index: gnue/gnuef/samples/zipcode/zip_code.gfd
diff -u gnue/gnuef/samples/zipcode/zip_code.gfd:1.2 
gnue/gnuef/samples/zipcode/zip_code.gfd:1.3
--- gnue/gnuef/samples/zipcode/zip_code.gfd:1.2 Sat Oct  7 17:27:05 2000
+++ gnue/gnuef/samples/zipcode/zip_code.gfd     Wed Oct 11 17:41:04 2000
@@ -1,7 +1,6 @@
 <?xml version="1.0" ?>
 
 <form>
-
   <options>
     <title>ZIP Code Maintenance</title>
     <version>0.0.1</version>
@@ -11,29 +10,27 @@
 
   <database name="gnue" provider="postgresql" dbname="gnue" host="gnue"/>
   <datasource name="zips" database="gnue" table="zip_code" cache="5"/> 
-  <datasource name="scratchpad" />
+  <datasource name="citylist" database="gnue" table="zip_code" cache="5"/>
 
   <page>
     <block name="zip" datasource="zips">
-      <label text="Zip Code" x="5" y="30"/>
-      <entry name="zip_code" field="zip" x="5" y="40" width="245" height="20"/>
-      <label text="City" x="5" y="55"/>
-      <entry name="city" field="city" x="5" y="65" width="245" height="20"/>
-      <label text="State" x="5" y="80"/>
-      <entry name="state" field="state" x="5" y="90" width="245" height="20"/>
+      <label text="Zip Code" x="5" y="10"/>
+      <entry name="zip_code" field="zip" x="5" y="20" width="150" height="20"/>
+      <label text="City" x="5" y="30"/>
+      <entry name="city" field="city" x="5" y="40" width="150" height="20"/>
+      <label text="State" x="5" y="50"/>
+      <entry name="state" field="state" x="5" y="60" width="150" height="20"/>
     </block>
-  </page>
 
-  <page>
-    <block name="scratchpad" datasource="scratchpad">
-      <label text="Bogus 1" x="5" y="30"/>
-      <entry name="b1" field="bogus1" x="5" y="40" width="245" height="20"/>
+    <block name="cites" datasource="citylist" masterBlock="zip" 
masterField="state">
+      <label text="City" x="5" y="80"/>
+      <entry name="city" field="city" x="5" y="90" width="150" height="20"/>
 
-      <label text="Bogus 2" x="5" y="55"/>
-      <entry name="b2" field="bogus2" x="5" y="65" width="245" height="20"/>
+      <label text="State" x="65" y="80"/>
+      <entry name="state" field="state" x="65" y="90" width="150" height="20"/>
 
-      <label text="Bogus 3" x="5" y="80"/>
-      <entry name="b3" field="bogus3" x="5" y="90" width="245" height="20"/>
+      <label text="Zip" x="125" y="80"/>
+      <entry name="zip" field="zip" x="125" y="90" width="150" height="20"/>
     </block>
   </page>
 
Index: gnue/gnuef/src/GFObjects.py
diff -u gnue/gnuef/src/GFObjects.py:1.16 gnue/gnuef/src/GFObjects.py:1.17
--- gnue/gnuef/src/GFObjects.py:1.16    Wed Oct 11 14:50:59 2000
+++ gnue/gnuef/src/GFObjects.py Wed Oct 11 17:41:04 2000
@@ -222,13 +222,16 @@
     if self.__dict__.has_key('masterBlock'):
       if self.masterBlock == event.data.name:
         fieldValue = self.form.findValue(self.masterBlock, self.masterField)
+        print "Master Field value is %s" % (fieldValue)
 
         ## clear the link
-        #self.dataSourceLink.clear()
-        #self.dataSourceLink.setField(0,self.masterField,fieldValue)
-        #self.dataSourceLink.query()
+        self.dataSourceLink.clear()
+        self.dataSourceLink.setField(0,self.masterField,fieldValue)
+        self.dataSourceLink.query()
         
-
+        self.recordCount = 
self.form.datasourceDictionary[self.datasource].getLastRecordNumber()
+        self.dispatchEvent(GFEvent('switchRECORD',[-1,0]));
+        self.currentRecord = 0
   #
   # Adds a record to the current records in memory
   #



reply via email to

[Prev in Thread] Current Thread [Next in Thread]