Changes between Version 1 and Version 2 of CallbacksAndForms
- Timestamp:
- 11/21/2008 07:32:33 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CallbacksAndForms
v1 v2 154 154 155 155 The callbacks of the ``h.input(type='checkbox')`` are only called for the 156 selected checkboxes. So, you need to reset the attribut s that keep the current156 selected checkboxes. So, you need to reset the attributes that keep the current 157 157 selected checkboxes before to process the callbacks. This reset method is 158 158 typically the ```pre_action`` callback of ``h.form``: … … 281 281 - that can be set with a value, by calling its ``.set()`` method or by directly 282 282 be called 283 - that always keeps the value in its ``input`` attribut 283 - that always keeps the value in its ``input`` attribute 284 284 - 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, 287 287 or ``None`` if the value is valid. 288 288 … … 393 393 394 394 An ``Editor`` object automatically creates ``editor.Property`` objects reflecting 395 the attribut s, of the target object, we want to edit with the form.396 397 An ``Editor`` object will modified the target object attribut s only if all the395 the attributes, of the target object, we want to edit with the form. 396 397 An ``Editor`` object will modified the target object attributes only if all the 398 398 validating functions of its properties validate the data from the form. 399 399 … … 402 402 403 403 In this example, we've got pure Python ``Person`` objects with ``name`` and 404 ``age`` attribut s:404 ``age`` attributes: 405 405 406 406 .. code-block:: python … … 416 416 417 417 We create a dedicated editor for this objects, to be able to edit these 418 attribut s with a web form:418 attributes with a web form: 419 419 420 420 .. code-block:: python