Changes between Version 1 and Version 2 of IS_ONE_OF_EMPTY


Ignore:
Timestamp:
02/03/10 19:11:14 (15 years ago)
Author:
Serge Sunneach
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IS_ONE_OF_EMPTY

    v1 v2  
    1111'''How to use the IS_ONE_OF_EMPTY?'''
    1212
    13 '''In controller.'''
     13'''1. Controller'''
    1414
    1515
    1616Keep in mind that the corresponding model assumes ''default validator'' against the organisation_id.
     17
    1718The working example is [http://bazaar.launchpad.net/~flavour/sahana/sahanapy-trunk/annotate/569/controllers/or.py controllers/or.py]:[[BR]]
    1819
    19 here the organisation_id is not mandatory, but if present, must be validated against the (large) organisation table.
     20here the organisation_id is not mandatory, but: if present, must be validated against the (large) organisation table.
    2021{{{
    2122def office():
     
    3031}}}
    3132
    32 '''Autocomplete - in the view.'''
     33
     34'''Note:''' the method ''update'' has a separate view file, and as of now it is not having the auto-complete functionality yet.
     35
     36Once it is ready, the line
     37{{{
     38if request.args(0) in ('create','update'):
     39}}}
     40will replace the existing one, taking care of just ''create'':
     41
     42{{{
     43if request.args(0) == 'create':
     44}}}
     45
     46
     47'''2. View - Auto-complete'''
    3348
    3449And the complimentary view [http://bazaar.launchpad.net/~flavour/sahana/sahanapy-trunk/annotate/569/views/or/office_create.html or/office_create.html]