I'm presented with the following situation:
I am creating a schema for a wine degustation.
One of the the fields describing the wine, the colour of the wine
(field: wine_colour), is implemented like a Choice field.
Red, white and roseƩ wines (field: wine_type) have different possible
shades of colour and I have one vocabulary devoted to each kind of
Now my problem:
During the editing of the schema, I need the right vocabulary
(shades_red, shades_white, shades_rosee) to be linked as source for
the Choice field (or the <option> items to populate the <select> tag
int he html page if you prefer) and the wine_type of the schema tells
me which vocubulary to use.
This is a dynamic bind.

I imagined 3 possible solutions:
1) list the content of each vocabulary in a separate <select> field.
Then use a radiobutton group to "activate" a different choice (aka:
wine_colour). I do not like it because I want only one vocabulary o be
2) split the schema into two pages: in the first page, and thus stage,
you define the wine colour, in the second the associated vocabulary is
used. I do not like it because I want all the data describing the
degustative experience in one page. This applies to page reloading
3) javascript: when the user selects one value for of the wine_colour,
using javascript I modifiy the <option> items in the <select> tag. I
do not like it because it seems to me rather messy, like putting
inline assembly code in a C++ program :)

Is there a more elegant way I am not aware of? what do you suggest me?
the ideal solution would be something like the TActiveControls of
Is there anything like that in Zope (as 3rd party lib maybe)?

Zope3-users mailing list

Reply via email to