Changes between Version 1 and Version 2 of CallbacksAndForms


Ignore:
Timestamp:
11/21/2008 07:32:33 PM (14 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CallbacksAndForms

    v1 v2  
    154154 
    155155The callbacks of the ``h.input(type='checkbox')`` are only called for the 
    156 selected checkboxes. So, you need to reset the attributs that keep the current 
     156selected checkboxes. So, you need to reset the attributes that keep the current 
    157157selected checkboxes before to process the callbacks. This reset method is 
    158158typically the ```pre_action`` callback of ``h.form``:  
     
    281281  - that can be set with a value, by calling its ``.set()`` method or by directly 
    282282    be called 
    283   - that always keeps the value in its ``input`` attribut 
     283  - that always keeps the value in its ``input`` attribute 
    284284  - that validates the value, by calling its validating function 
    285   - that keeps the last valid value in its ``value`` attribut 
    286   - that keeps the error message of the validation in its ``error`` attribut, 
     285  - that keeps the last valid value in its ``value`` attribute 
     286  - that keeps the error message of the validation in its ``error`` attribute, 
    287287    or ``None`` if the value is valid. 
    288288   
     
    393393 
    394394An ``Editor`` object automatically creates ``editor.Property`` objects reflecting 
    395 the attributs, of the target object, we want to edit with the form. 
    396  
    397 An ``Editor`` object will modified the target object attributs only if all the 
     395the attributes, of the target object, we want to edit with the form. 
     396 
     397An ``Editor`` object will modified the target object attributes only if all the 
    398398validating functions of its properties validate the data from the form.   
    399399 
     
    402402 
    403403In this example, we've got pure Python ``Person`` objects with ``name`` and 
    404 ``age`` attributs: 
     404``age`` attributes: 
    405405 
    406406.. code-block:: python 
     
    416416            
    417417We create a dedicated editor for this objects, to be able to edit these 
    418 attributs with a web form: 
     418attributes with a web form: 
    419419 
    420420.. code-block:: python