[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUe] Categories
From: |
Alex King |
Subject: |
[GNUe] Categories |
Date: |
Sun, 12 Sep 2004 11:58:20 +1200 |
User-agent: |
Mutt/1.5.6+20040722i |
I'm new to gnue, having a problem with designing a form in a 2 tier
application (ie, without appserver)
I want to have a form for entry of stock items, where the items are
categorised by "type" and "section".
There are 4 types, and each type has a different number of subtypes
which I have called setions.
During normal stock data entry, I want the user to select the type and
section of the item from drop-down lists.
The types and sections are stored in two configuration tables in a
master-detail relationship. (ie, the types and sections are not hard
coded into the form, but are configurable by adding to database tables.)
When I declare the master detail relationships in the block definition
as I have in the attached gfd file and run the form, it emtis a
traceback when I click on the traceback drop-down. This wasn't really a
great surprise, because I don't know if this is an intended usage.
My thoughts for resolving this:
1. Hack on gnue to make this work (I'm using the debian sarge gnue
packages). Can anyone tell me (a) if this is a sane thing to want to
do, and (b) where to start looking if it is.
2. Have type dropdown triggers impose a condition on the section
dropdown datasource somehow. Ie, when a type is selected, perhaps a
post change trigger on the type field could somehow impose a "where
type='newtype'" condition on the sql used to select the items for the
section dropdown. Can anyone tell me if I can programatically impose a
condition and re-run the query, and how to do this?
3. Have a datasource not directly tied to a db table, but implemented as
a python object (list) somehow, and have the type trigger fill the list
with a db query each time the type object changes. This option is
probably the least elegant, but it has a certain amount of appeal
because I am familiar with python. Does anyone know if it is possible
to have an arbtary python object as a datasource, and if so, how?
4. Would appserver help me? The docs are scarce, and I've not taken
time yet to investigate, so I have no idea myself.
BTW, I love the whole gnue thing, great work folks. I'm happy to help
out in any way I can.
Alex
StockMaintenanceTest.gfd
Description: Text document
StockMaintenanceTest.traceback
Description: Text document
database.sql
Description: Text document
- [GNUe] Categories,
Alex King <=