Well, it's not a tree. The 'process' object is a model to follow to dynamically generate fields to fill in in a form. When a step model is 'repeated' that means that the form will have to generate a field (a clone of the step model) and then will have to look to the submit button (validate) to generate a new clone, or (Newt Step) to read the next step model. If a step is 'unique', the form will jump to the new step after validation (the next step button). I don't know if my question is clear. If not, i'll reformulate it. (english is not my mother language but french is.) I wanted to avoid learning Javascript as in the past weeks i began to learn Python, Zope, Plone, CSS, HTML and so on? Pfff. I supposed that JS might be necessary but... Where can i find documentation on DHTML ? I suppose context is relative to acquisition so i have to dive into acquisition. What suggestions would you make to a newbie to structure his learning of Zope ? A method to learn. Note that by reading and crossing thousands of pages i begin to have a precise global vision of the system but what i'd like to do is to go back to the beginning and read again with my new knowledge. But what is the beginning and what must be the steps to follow to be on the way of having a deep and structured knowledge before years of experience ;-) And thanks for the job you do for the community Andre Dieter Maurer a écrit:
aborel wrote at 2003-1-15 11:07 -0400:
Some questions on tal:repeat.
1) Generating fields
I have an object called 'process' this object contains a list of steps to follow to perform the process. A step have a type that may be 'unique' or 'repeated' For example : an invoice CustomerId : Unique step ProductId : Repeated step (number of repetitions undefined) ProductId : 1 (sub-step) ProductId : 2 (sub-step) ... ProductId : n (sub-step)(repeated until user chosees next step) NetDue : Unique step
What i want to do is to generate fields steps by step depending on the type of the step by using tal:repeat to loop over the list of steps and display the rights fields. A 'unique' step will have one submit button : Next Step A 'repeated' step will have to submit buttons : Validate (to fill in a new sub-step) and Next Step. Tal:repeat is useful on 'uniqu'e steps but when i encounter a 'repeated' step, i can't use it as it's not a sequence and the number of repetitions is undefined.
Any Suggestions will be greatly appreciated. This is similar to a tree generation.
Have a look at "ZTUtils.Tree" and the corresponding example (in the ZPT examples).
2) Validating fields
Is it possible to use Python scripts instead of Ecma scripts on core events like onBlur, Onclick and so on ? No.
You can use Python scripts for validation on the server side (after the form is submitted).
3) Displaying the fields
Each time a field is filled in, i'd like to display it at the end of a listing without re-redenring all the web page, just the changes (understandable ??? ;-)). You want to learn about DHTML (Dynamic HTML). You do this with JavaScript. ... 4) Storing the generated objects
The form template will be called from various place on the site so how do i indicate the exact place to store the generated objects ? You use the form action like a method of the target object. If it is a Python Script (this is a good suggestion), then "context" is the target object. You can create the object at any place you can reach via "context".
Dieter
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )