[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9216 - in trunk/gnue-samples/two-tier: . bin forms schema
From: |
reinhard |
Subject: |
[gnue] r9216 - in trunk/gnue-samples/two-tier: . bin forms schema |
Date: |
Fri, 5 Jan 2007 15:08:42 -0600 (CST) |
Author: reinhard
Date: 2007-01-05 15:08:41 -0600 (Fri, 05 Jan 2007)
New Revision: 9216
Added:
trunk/gnue-samples/two-tier/bin/run-svn.sh
trunk/gnue-samples/two-tier/bin/run.sh
trunk/gnue-samples/two-tier/forms/countries.gfd
trunk/gnue-samples/two-tier/forms/customers.gfd
trunk/gnue-samples/two-tier/forms/invoices.gfd
trunk/gnue-samples/two-tier/schema/item.gsd
Removed:
trunk/gnue-samples/two-tier/forms/country.gfd
trunk/gnue-samples/two-tier/forms/customer.gfd
trunk/gnue-samples/two-tier/forms/invoice.gfd
trunk/gnue-samples/two-tier/schema/items.gsd
Modified:
trunk/gnue-samples/two-tier/README
trunk/gnue-samples/two-tier/forms/items.gfd
Log:
Added a navigator file, be more consistent about singular and plural in names
(tables are singular, forms are plural).
Modified: trunk/gnue-samples/two-tier/README
===================================================================
--- trunk/gnue-samples/two-tier/README 2007-01-05 19:23:51 UTC (rev 9215)
+++ trunk/gnue-samples/two-tier/README 2007-01-05 21:08:41 UTC (rev 9216)
@@ -29,11 +29,11 @@
On an SVN copy you might do:
-gfcvs --connections=etc/connections.conf forms/customer.gfd
+gfcvs --connections=etc/connections.conf forms/customers.gfd
On an installed version:
-gnue-forms --connections=etc/connections.conf forms/customer.gfd
+gnue-forms --connections=etc/connections.conf forms/customers.gfd
Of course you could add the [sample] connection to your system's
connections.conf in order to avoid adding the additional argument
Added: trunk/gnue-samples/two-tier/bin/run-svn.sh
===================================================================
--- trunk/gnue-samples/two-tier/bin/run-svn.sh 2007-01-05 19:23:51 UTC (rev
9215)
+++ trunk/gnue-samples/two-tier/bin/run-svn.sh 2007-01-05 21:08:41 UTC (rev
9216)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+gncvs --connections=etc/connections.conf processes/sample.gpd
Property changes on: trunk/gnue-samples/two-tier/bin/run-svn.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/gnue-samples/two-tier/bin/run.sh
===================================================================
--- trunk/gnue-samples/two-tier/bin/run.sh 2007-01-05 19:23:51 UTC (rev
9215)
+++ trunk/gnue-samples/two-tier/bin/run.sh 2007-01-05 21:08:41 UTC (rev
9216)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+gnue-navigator --connections=etc/connections.conf processes/sample.gpd
Property changes on: trunk/gnue-samples/two-tier/bin/run.sh
___________________________________________________________________
Name: svn:executable
+ *
Copied: trunk/gnue-samples/two-tier/forms/countries.gfd (from rev 9215,
trunk/gnue-samples/two-tier/forms/country.gfd)
===================================================================
--- trunk/gnue-samples/two-tier/forms/country.gfd 2007-01-05 19:23:51 UTC
(rev 9215)
+++ trunk/gnue-samples/two-tier/forms/countries.gfd 2007-01-05 21:08:41 UTC
(rev 9216)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<form title="Countries">
+ <options>
+ <author>GNU Enterprise Team</author>
+ <version>$Rev$</version>
+ <description>
+ This lists the country names in alphabetical order.
+ </description>
+ </options>
+
+ <datasource name="dts_country" connection="sample" table="country"
+ prequery="Y">
+ <sortorder>
+ <sortfield name="code" descending="False" ignorecase="False" />
+ </sortorder>
+ </datasource>
+
+ <logic>
+ <block name="blk_country" datasource="dts_country">
+ <field name="code" field="code" datatype="text" maxLength="2" />
+ <field name="name" field="name" datatype="text" maxLength="50" />
+ </block>
+ </logic>
+
+ <layout>
+ <page name="Countries" caption="Countries">
+ <vbox name="box" block="blk_country">
+ <grid name="grid" rows="15">
+ <gridline>
+ <entry name="code" field="code" label="Code"/>
+ <entry name="name" field="name" label="Name"/>
+ </gridline>
+ </grid>
+ </vbox>
+ </page>
+ </layout>
+
+</form>
Deleted: trunk/gnue-samples/two-tier/forms/country.gfd
===================================================================
--- trunk/gnue-samples/two-tier/forms/country.gfd 2007-01-05 19:23:51 UTC
(rev 9215)
+++ trunk/gnue-samples/two-tier/forms/country.gfd 2007-01-05 21:08:41 UTC
(rev 9216)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<form title="Country names">
- <options>
- <author>GNU Enterprise Samples</author>
- <version>$Rev$</version>
- <description>
- This lists the country names in alphabetical order
- </description>
- </options>
-
- <datasource name="dts_country" connection="sample" table="country"
- prequery="Y">
- <sortorder>
- <sortfield name="code" descending="False" ignorecase="False" />
- </sortorder>
- </datasource>
-
- <logic>
- <block name="blk_country" datasource="dts_country">
- <field name="code" field="code" datatype="text" maxLength="2" />
- <field name="name" field="name" datatype="text" maxLength="50" />
- </block>
- </logic>
-
- <layout>
- <page name="Countries" caption="Countries">
- <vbox name="box" block="blk_country">
- <grid name="grid" rows="15">
- <gridline>
- <entry name="code" field="code" label="Code"/>
- <entry name="name" field="name" label="Name"/>
- </gridline>
- </grid>
- </vbox>
- </page>
- </layout>
-
-</form>
Deleted: trunk/gnue-samples/two-tier/forms/customer.gfd
===================================================================
--- trunk/gnue-samples/two-tier/forms/customer.gfd 2007-01-05 19:23:51 UTC
(rev 9215)
+++ trunk/gnue-samples/two-tier/forms/customer.gfd 2007-01-05 21:08:41 UTC
(rev 9216)
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<form title="Customers">
- <options>
- <author>GNU Enterprise Samples</author>
- <version>$Rev$</version>
- <description>Our customers</description>
- </options>
-
- <datasource name="dts_customer" connection="sample" table="customer" >
- <sortorder>
- <sortfield name="name" descending="False" ignorecase="True" />
- <sortfield name="city" descending="False" ignorecase="True" />
- </sortorder>
- </datasource>
-
- <datasource name="dts_billing" connection="sample" table="customer"
- prequery="Y">
- <sortorder>
- <sortfield name="name" descending="False" ignorecase="True" />
- <sortfield name="city" descending="False" ignorecase="True" />
- </sortorder>
- </datasource>
-
- <datasource name="dts_country" connection="sample" table="country"
- prequery="Y">
- <sortorder>
- <sortfield name="code" descending="False" />
- </sortorder>
- </datasource>
-
- <logic>
- <block name="blk_customer" datasource="dts_customer">
- <field name="code" field="code" datatype="text" maxLength="16"
- case="upper" />
- <field name="name" field="name" datatype="text" maxLength="50" />
- <field name="address1" field="address1" datatype="text" maxLength="50" />
- <field name="address2" field="address2" datatype="text" maxLength="50" />
- <field name="city" field="city" datatype="text" maxLength="30" />
- <field name="zip" field="zip" datatype="text" maxLength="10" />
- <field name="country_code" field="country" fk_key="id"
- fk_description="code" fk_source="dts_country" case="upper"/>
- <field name="country_name" field="country" fk_key="id"
- fk_description="name" fk_source="dts_country" />
- <field name="billing" field="billing_address" fk_key="id"
- fk_description="name,city" fk_source="dts_billing" />
- <field name="created" field="created" datatype="datetime" />
- <field name="inactive" field="inactive" datatype="boolean" />
- <field name="last_invoice" field="last_invoice" datatype="date" />
-
- <trigger type="ON-NEWRECORD">
- import datetime
- blk_customer.created = datetime.datetime.today()
- </trigger>
-
- </block>
- </logic>
-
- <layout xmlns:s="GNUe:Layout:Sizer">
- <page name="pg_customer" caption="Customer">
- <vbox name="box" block="blk_customer">
- <entry name="code" field="code" label="Customer code:"/>
- <entry name="name" field="name" label="Name:"/>
- <entry name="address1" field="address1" label="Address 1:"/>
- <entry name="address2" field="address2" label="Address 2:"/>
- <entry name="city" field="city" label="City:"/>
- <entry name="zip" field="zip" label="Zip:"/>
-
- <hbox name="country">
- <entry name="country_code" field="country_code" label="Country code:"
- s:stretch="0" style="dropdown" />
- <entry name="country_name" field="country_name" label="Country name:"
- style="dropdown" />
- </hbox>
-
- <entry name="inactive" field="inactive" label="Inactive" />
- <entry name="billing" field="billing" label="Billing address:" />
- <entry name="created" field="created" label="Created:" style="label"/>
- <entry name="lastinv" field="last_invoice" label="Last invoice:"
- style="label"/>
- </vbox>
- </page>
- </layout>
-
-</form>
Copied: trunk/gnue-samples/two-tier/forms/customers.gfd (from rev 9215,
trunk/gnue-samples/two-tier/forms/customer.gfd)
===================================================================
--- trunk/gnue-samples/two-tier/forms/customer.gfd 2007-01-05 19:23:51 UTC
(rev 9215)
+++ trunk/gnue-samples/two-tier/forms/customers.gfd 2007-01-05 21:08:41 UTC
(rev 9216)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<form title="Customers">
+ <options>
+ <author>GNU Enterprise Samples</author>
+ <version>$Rev$</version>
+ <description>Our customers.</description>
+ </options>
+
+ <datasource name="dts_customer" connection="sample" table="customer" >
+ <sortorder>
+ <sortfield name="name" descending="False" ignorecase="True" />
+ <sortfield name="city" descending="False" ignorecase="True" />
+ </sortorder>
+ </datasource>
+
+ <datasource name="dts_billing" connection="sample" table="customer"
+ prequery="Y">
+ <sortorder>
+ <sortfield name="name" descending="False" ignorecase="True" />
+ <sortfield name="city" descending="False" ignorecase="True" />
+ </sortorder>
+ </datasource>
+
+ <datasource name="dts_country" connection="sample" table="country"
+ prequery="Y">
+ <sortorder>
+ <sortfield name="code" descending="False" />
+ </sortorder>
+ </datasource>
+
+ <logic>
+ <block name="blk_customer" datasource="dts_customer">
+ <field name="code" field="code" datatype="text" maxLength="16"
+ case="upper" />
+ <field name="name" field="name" datatype="text" maxLength="50" />
+ <field name="address1" field="address1" datatype="text" maxLength="50" />
+ <field name="address2" field="address2" datatype="text" maxLength="50" />
+ <field name="city" field="city" datatype="text" maxLength="30" />
+ <field name="zip" field="zip" datatype="text" maxLength="10" />
+ <field name="country_code" field="country" fk_key="id"
+ fk_description="code" fk_source="dts_country" case="upper"/>
+ <field name="country_name" field="country" fk_key="id"
+ fk_description="name" fk_source="dts_country" />
+ <field name="billing" field="billing_address" fk_key="id"
+ fk_description="name,city" fk_source="dts_billing" />
+ <field name="created" field="created" datatype="datetime" />
+ <field name="inactive" field="inactive" datatype="boolean" />
+ <field name="last_invoice" field="last_invoice" datatype="date" />
+
+ <trigger type="ON-NEWRECORD">
+ import datetime
+ blk_customer.created = datetime.datetime.today()
+ </trigger>
+
+ </block>
+ </logic>
+
+ <layout xmlns:s="GNUe:Layout:Sizer">
+ <page name="pg_customer" caption="Customer">
+ <vbox name="box" block="blk_customer">
+ <entry name="code" field="code" label="Customer code:"/>
+ <entry name="name" field="name" label="Name:"/>
+ <entry name="address1" field="address1" label="Address 1:"/>
+ <entry name="address2" field="address2" label="Address 2:"/>
+ <entry name="city" field="city" label="City:"/>
+ <entry name="zip" field="zip" label="Zip:"/>
+
+ <hbox name="country">
+ <entry name="country_code" field="country_code" label="Country code:"
+ s:stretch="0" style="dropdown" />
+ <entry name="country_name" field="country_name" label="Country name:"
+ style="dropdown" />
+ </hbox>
+
+ <entry name="inactive" field="inactive" label="Inactive" />
+ <entry name="billing" field="billing" label="Billing address:" />
+ <entry name="created" field="created" label="Created:" style="label"/>
+ <entry name="lastinv" field="last_invoice" label="Last invoice:"
+ style="label"/>
+ </vbox>
+ </page>
+ </layout>
+
+</form>
Deleted: trunk/gnue-samples/two-tier/forms/invoice.gfd
===================================================================
--- trunk/gnue-samples/two-tier/forms/invoice.gfd 2007-01-05 19:23:51 UTC
(rev 9215)
+++ trunk/gnue-samples/two-tier/forms/invoice.gfd 2007-01-05 21:08:41 UTC
(rev 9216)
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<form title="Invoices">
- <options>
- <author>GNU Enterprise Samples</author>
- <version>$Rev$</version>
- <description>Invoices</description>
- </options>
-
- <datasource name="dts_customer" connection="sample" table="customer"
- prequery="Y">
- <sortorder>
- <sortfield name="name" descending="False" ignorecase="True" />
- <sortfield name="city" descending="False" ignorecase="True" />
- </sortorder>
- </datasource>
-
- <datasource name="dts_items" connection="sample" table="items" prequery="Y">
- <sortorder>
- <sortfield name="sku" descending="False" ignorecase="True" />
- </sortorder>
- </datasource>
-
- <datasource name="dts_invoice" connection="sample" table="invoice" >
- <sortorder>
- <sortfield name="date" descending="True" />
- </sortorder>
- </datasource>
-
- <datasource name="dts_invoice_item" connection="sample" table="invoice_item"
- master="dts_invoice" masterlink="id" detaillink="invoice" />
-
- <logic>
- <block name="blk_invoice" datasource="dts_invoice">
- <field name="id" field="id" datatype="number" length="8" scale="0"/>
-
- <field name="date" field="date" datatype="date" />
- <field name="delivery" field="delivery" datatype="datetime" />
- <field name="created" field="created" datatype="datetime" />
-
- <field name="tax_rate" field="tax_rate" datatype="number" length="9"
- scale="4">
- <trigger type="POST-CHANGE">
- activateTrigger('calculate_total')
- </trigger>
- </field>
-
- <field name="tax_total" field="tax_total" datatype="number" length="9"
- scale="2"/>
- <field name="subtotal" field="subtotal" datatype="number" length="9"
- scale="2"/>
- <field name="grand_total" field="grand_total" datatype="number"
- length="9" scale="2"/>
-
- <field name="customer" field="customer" fk_key="id" fk_description="name"
- fk_source="dts_customer" />
-
- <trigger type="ON-NEWRECORD">
- import datetime
- today = datetime.datetime.today()
-
- blk_invoice.created = today
- blk_invoice.date = today.date()
- </trigger>
-
- <trigger type="PRE-COMMIT">
- activateTrigger('calculate_total')
- </trigger>
-
- <trigger type="NAMED" name="calculate_total">
- # First get the sub-total
- subtotal = 0
- taxrate = float(blk_invoice.tax_rate.get() or 0)
- for item in blk_invoice_item.getResultSet():
- subtotal += (item[u'quantity'] or 0) * (item[u'unit_price'] or 0)
-
- tax_total = subtotal * taxrate / 100
-
- blk_invoice.subtotal = subtotal
- blk_invoice.tax_total = tax_total
- blk_invoice.grand_total = subtotal + tax_total
- </trigger>
-
- </block>
-
- <block name="blk_invoice_item" datasource="dts_invoice_item">
- <field name="sku" field="sku" fk_source="dts_items" fk_key="id"
- fk_description="sku" />
- <field name="sku_name" field="sku" fk_source="dts_items" fk_key="id"
- fk_description="description" />
- <field name="default_price" field="sku" fk_source="dts_items" fk_key="id"
- fk_description="price" />
-
- <field name="quantity" field="quantity" datatype="number" length="6">
- <trigger type="PRE-FOCUSOUT">
- if not blk_invoice_item.quantity.value:
- abort('Please enter a valid quantity')
- </trigger>
- <trigger type="POST-CHANGE">
- activateTrigger('calculate_total')
- </trigger>
- </field>
-
- <field name="price" field="unit_price" datatype="number" length="9"
- scale="2" >
- <trigger type="PRE-FOCUSIN">
- if not blk_invoice_item.price.value:
- blk_invoice_item.price = blk_invoice_item.default_price.value
- </trigger>
- <trigger type="POST-CHANGE">
- activateTrigger('calculate_total')
- </trigger>
- </field>
- </block>
-
- </logic>
-
- <layout xmlns:s="GNUe:Layout:Sizer">
- <page name="pg_invoice" caption="Invoice">
- <vbox name="box" block="blk_invoice">
- <entry field="id" label="Invoice:" style="label" />
- <entry field="customer" label="Customer:"/>
-
- <entry field="date" label="Invoice date:"/>
- <entry field="delivery" label="Delivery on:"/>
-
- <entry field="tax_rate" label="Tax rate:"/>
- <entry field="subtotal" label="Subtotal:" style="label" />
- <entry field="tax_total" label="+Tax total:" style="label" />
- <entry field="grand_total" label="Grand total:" style="label" />
-
- <vbox name="items" label="Items" block="blk_invoice_item">
- <grid name="detail_grid" rows="10">
- <gridline>
- <entry name="sku" field="sku" label="SKU" />
- <entry name="sku_name" field="sku_name" label="SKU description"
/>
- <entry name="qty" field="quantity" label="Quantity" />
- <entry name="price" field="price" label="Price" />
- </gridline>
- </grid>
- </vbox>
-
- </vbox>
-
- </page>
- </layout>
-
-</form>
Copied: trunk/gnue-samples/two-tier/forms/invoices.gfd (from rev 9215,
trunk/gnue-samples/two-tier/forms/invoice.gfd)
===================================================================
--- trunk/gnue-samples/two-tier/forms/invoice.gfd 2007-01-05 19:23:51 UTC
(rev 9215)
+++ trunk/gnue-samples/two-tier/forms/invoices.gfd 2007-01-05 21:08:41 UTC
(rev 9216)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<form title="Invoices">
+ <options>
+ <author>GNU Enterprise Samples</author>
+ <version>$Rev$</version>
+ <description>Invoices.</description>
+ </options>
+
+ <datasource name="dts_customer" connection="sample" table="customer"
+ prequery="Y">
+ <sortorder>
+ <sortfield name="name" descending="False" ignorecase="True" />
+ <sortfield name="city" descending="False" ignorecase="True" />
+ </sortorder>
+ </datasource>
+
+ <datasource name="dts_item" connection="sample" table="item" prequery="Y">
+ <sortorder>
+ <sortfield name="sku" descending="False" ignorecase="True" />
+ </sortorder>
+ </datasource>
+
+ <datasource name="dts_invoice" connection="sample" table="invoice" >
+ <sortorder>
+ <sortfield name="date" descending="True" />
+ </sortorder>
+ </datasource>
+
+ <datasource name="dts_invoice_item" connection="sample" table="invoice_item"
+ master="dts_invoice" masterlink="id" detaillink="invoice" />
+
+ <logic>
+ <block name="blk_invoice" datasource="dts_invoice">
+ <field name="id" field="id" datatype="number" length="8" scale="0"/>
+
+ <field name="date" field="date" datatype="date" />
+ <field name="delivery" field="delivery" datatype="datetime" />
+ <field name="created" field="created" datatype="datetime" />
+
+ <field name="tax_rate" field="tax_rate" datatype="number" length="9"
+ scale="4">
+ <trigger type="POST-CHANGE">
+ activateTrigger('calculate_total')
+ </trigger>
+ </field>
+
+ <field name="tax_total" field="tax_total" datatype="number" length="9"
+ scale="2"/>
+ <field name="subtotal" field="subtotal" datatype="number" length="9"
+ scale="2"/>
+ <field name="grand_total" field="grand_total" datatype="number"
+ length="9" scale="2"/>
+
+ <field name="customer" field="customer" fk_key="id" fk_description="name"
+ fk_source="dts_customer" />
+
+ <trigger type="ON-NEWRECORD">
+ import datetime
+ today = datetime.datetime.today()
+
+ blk_invoice.created = today
+ blk_invoice.date = today.date()
+ </trigger>
+
+ <trigger type="PRE-COMMIT">
+ activateTrigger('calculate_total')
+ </trigger>
+
+ <trigger type="NAMED" name="calculate_total">
+ # First get the sub-total
+ subtotal = 0
+ taxrate = float(blk_invoice.tax_rate.get() or 0)
+ for item in blk_invoice_item.getResultSet():
+ subtotal += (item[u'quantity'] or 0) * (item[u'unit_price'] or 0)
+
+ tax_total = subtotal * taxrate / 100
+
+ blk_invoice.subtotal = subtotal
+ blk_invoice.tax_total = tax_total
+ blk_invoice.grand_total = subtotal + tax_total
+ </trigger>
+
+ </block>
+
+ <block name="blk_invoice_item" datasource="dts_invoice_item">
+ <field name="sku" field="sku" fk_source="dts_item" fk_key="id"
+ fk_description="sku" />
+ <field name="sku_name" field="sku" fk_source="dts_item" fk_key="id"
+ fk_description="description" />
+ <field name="default_price" field="sku" fk_source="dts_item" fk_key="id"
+ fk_description="price" />
+
+ <field name="quantity" field="quantity" datatype="number" length="6">
+ <trigger type="PRE-FOCUSOUT">
+ if not blk_invoice_item.quantity.value:
+ abort('Please enter a valid quantity')
+ </trigger>
+ <trigger type="POST-CHANGE">
+ activateTrigger('calculate_total')
+ </trigger>
+ </field>
+
+ <field name="price" field="unit_price" datatype="number" length="9"
+ scale="2" >
+ <trigger type="PRE-FOCUSIN">
+ if not blk_invoice_item.price.value:
+ blk_invoice_item.price = blk_invoice_item.default_price.value
+ </trigger>
+ <trigger type="POST-CHANGE">
+ activateTrigger('calculate_total')
+ </trigger>
+ </field>
+ </block>
+
+ </logic>
+
+ <layout xmlns:s="GNUe:Layout:Sizer">
+ <page name="pg_invoice" caption="Invoice">
+ <vbox name="box" block="blk_invoice">
+ <entry field="id" label="Invoice:" style="label" />
+ <entry field="customer" label="Customer:"/>
+
+ <entry field="date" label="Invoice date:"/>
+ <entry field="delivery" label="Delivery on:"/>
+
+ <entry field="tax_rate" label="Tax rate:"/>
+ <entry field="subtotal" label="Subtotal:" style="label" />
+ <entry field="tax_total" label="+Tax total:" style="label" />
+ <entry field="grand_total" label="Grand total:" style="label" />
+
+ <vbox name="item" label="Items" block="blk_invoice_item">
+ <grid name="detail_grid" rows="10">
+ <gridline>
+ <entry name="sku" field="sku" label="SKU" />
+ <entry name="sku_name" field="sku_name" label="SKU description"
/>
+ <entry name="qty" field="quantity" label="Quantity" />
+ <entry name="price" field="price" label="Price" />
+ </gridline>
+ </grid>
+ </vbox>
+
+ </vbox>
+
+ </page>
+ </layout>
+
+</form>
Modified: trunk/gnue-samples/two-tier/forms/items.gfd
===================================================================
--- trunk/gnue-samples/two-tier/forms/items.gfd 2007-01-05 19:23:51 UTC (rev
9215)
+++ trunk/gnue-samples/two-tier/forms/items.gfd 2007-01-05 21:08:41 UTC (rev
9216)
@@ -4,17 +4,17 @@
<options>
<author>GNU Enterprise Samples</author>
<version>$Rev$</version>
- <description>Our Goods</description>
+ <description>Our goods.</description>
</options>
- <datasource name="dts_items" connection="sample" table="items" >
+ <datasource name="dts_item" connection="sample" table="item" >
<sortorder>
<sortfield name="sku" descending="False" ignorecase="True" />
</sortorder>
</datasource>
<logic>
- <block name="blk_items" datasource="dts_items">
+ <block name="blk_item" datasource="dts_item">
<field name="sku" field="sku" datatype="text" maxLength="16"
case="upper"/>
<field name="description" field="description" datatype="text"
@@ -26,21 +26,21 @@
<field name="picture" />
<trigger type="ON-RECORDLOADED">
- url = "./images/%s.jpg" % blk_items.sku.get()
- blk_items.picture = url
+ url = "./images/%s.jpg" % blk_item.sku.get()
+ blk_item.picture = url
</trigger>
</block>
</logic>
<layout xmlns:s="GNUe:Layout:Sizer">
- <page name="pg_items" caption="Items">
- <vbox name="box" block="blk_items">
+ <page name="pg_item" caption="Items">
+ <vbox name="box" block="blk_item">
<entry name="sku" field="sku" label="SKU:"/>
<entry name="description" field="description" label="Description:"/>
<entry name="price" field="price" label="Unit Price:"/>
<entry name="prep" field="prep" label="Preparatory time:"/>
<entry name="text" field="text" label="Text:" style="multiline"/>
- <image name="image" field="picture" label="Picutre" block="blk_items"
+ <image name="image" field="picture" label="Picutre" block="blk_item"
s:width="150" s:height="100" fit="auto"/>
</vbox>
</page>
Copied: trunk/gnue-samples/two-tier/schema/item.gsd (from rev 9215,
trunk/gnue-samples/two-tier/schema/items.gsd)
===================================================================
--- trunk/gnue-samples/two-tier/schema/items.gsd 2007-01-05 19:23:51 UTC
(rev 9215)
+++ trunk/gnue-samples/two-tier/schema/item.gsd 2007-01-05 21:08:41 UTC (rev
9216)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<schema>
+ <tables>
+ <table name="item">
+ <fields>
+ <field name="id" type="number" length="8" nullable="N"
+ defaultwith="serial"/>
+
+ <field name="sku" type="string" length="16" nullable="N" />
+ <field name="description" type="string" length="50" />
+ <field name="price" type="number" length="9" precision="2" />
+ <field name="text" type="string" length="1000" />
+ <field name="prep_time" type="time" />
+ </fields>
+
+ <primarykey name="pk_item">
+ <pkfield name="id"/>
+ </primarykey>
+
+ <indexes>
+ <index name="unique_sku" unique="True">
+ <indexfield name="sku"/>
+ </index>
+ </indexes>
+
+ <constraints/>
+ </table>
+ </tables>
+
+ <data>
+ <tabledata name="items" tablename="item">
+ <rows>
+ <row>
+ <value field="id">0</value>
+ <value field="sku">MAC-G5</value>
+ <value field="description">iMac G5 2GHZ</value>
+ <value field="price">2125.00</value>
+ <value field="text">Fine computer having lots of RAM and a very big
hard disk drive</value>
+ <value field="prep_time">00:30:00</value>
+ </row>
+ <row>
+ <value field="id">1</value>
+ <value field="sku">LHARDY</value>
+ <value field="description">Thumb on fire! 100 x 60 cm</value>
+ <value field="price">17.50</value>
+ <value field="text">Picture of Stan Laurel and Oliver Hardy</value>
+ <value field="prep_time">01:15:00</value>
+ </row>
+ </rows>
+ </tabledata>
+ </data>
+
+</schema>
Deleted: trunk/gnue-samples/two-tier/schema/items.gsd
===================================================================
--- trunk/gnue-samples/two-tier/schema/items.gsd 2007-01-05 19:23:51 UTC
(rev 9215)
+++ trunk/gnue-samples/two-tier/schema/items.gsd 2007-01-05 21:08:41 UTC
(rev 9216)
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<schema>
- <tables>
- <table name="items">
- <fields>
- <field name="id" type="number" length="8" nullable="N"
- defaultwith="serial"/>
-
- <field name="sku" type="string" length="16" nullable="N" />
- <field name="description" type="string" length="50" />
- <field name="price" type="number" length="9" precision="2" />
- <field name="text" type="string" length="1000" />
- <field name="prep_time" type="time" />
- </fields>
-
- <primarykey name="pk_item">
- <pkfield name="id"/>
- </primarykey>
-
- <indexes>
- <index name="unique_sku" unique="True">
- <indexfield name="sku"/>
- </index>
- </indexes>
-
- <constraints/>
- </table>
- </tables>
-
- <data>
- <tabledata name="items" tablename="items">
- <rows>
- <row>
- <value field="id">0</value>
- <value field="sku">MAC-G5</value>
- <value field="description">iMac G5 2GHZ</value>
- <value field="price">2125.00</value>
- <value field="text">Fine computer having lots of RAM and a very big
hard disk drive</value>
- <value field="prep_time">00:30:00</value>
- </row>
- <row>
- <value field="id">1</value>
- <value field="sku">LHARDY</value>
- <value field="description">Thumb on fire! 100 x 60 cm</value>
- <value field="price">17.50</value>
- <value field="text">Picture of Stan Laurel and Oliver Hardy</value>
- <value field="prep_time">01:15:00</value>
- </row>
- </rows>
- </tabledata>
- </data>
-
-</schema>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9216 - in trunk/gnue-samples/two-tier: . bin forms schema,
reinhard <=