parameters: (self, field, id, **kw)
return_statement: return return_value, isCacheable(return_value)
docstring: Return a callable expression and cacheable boolean flag
docstring_summary: Return a callable expression and cacheable boolean flag
docstring_tokens: Return a callable expression and cacheable boolean flag
function: def getFieldValue(self, field, id, **kw):
    """
      Return a callable expression and cacheable boolean flag
    """
    tales_expr = self.tales.get(id, "")
    if tales_expr:
      # TALESMethod is persistent object, so that we cannot cache original one.
      # Becase if connection which original talesmethod uses is closed,
      # RuntimeError must occurs in __setstate__.
      tales_expr = copyMethod(tales_expr)
      return TALESValue(tales_expr), isCacheable(tales_expr)
  
    override = self.overrides.get(id, "")
    if override:
      override = copyMethod(override)
      return OverrideValue(override), isCacheable(override)
  
    # Get a normal value.
    value = self.get_orig_value(id)
    value = copyMethod(value)
    cacheable = isCacheable(value)
  
    field_id = field.id
  
    if id == 'default' and (field_id.startswith('my_') or
                            field_id.startswith('listbox_')):
      if field.meta_type == 'ProxyField' and \
          field.getRecursiveTemplateField().meta_type == 'CheckBoxField' or \
          self.meta_type == 'CheckBoxField':
        return DefaultCheckBoxValue(field_id, value), cacheable
      return DefaultValue(field_id, value), cacheable
  
    # For the 'editable' value, we try to get a default value
    if id == 'editable':
      return EditableValue(value), cacheable
  
    # Return default value in callable mode
    if callable(value):
      return StaticValue(value), cacheable
  
    # Return default value in non callable mode
    return_value = StaticValue(value)(field, id, **kw)
    return return_value, isCacheable(return_value)
function_tokens: def getFieldValue ( self , field , id , * * kw ) : tales_expr = self . tales . get ( id , "" ) if tales_expr : # TALESMethod is persistent object, so that we cannot cache original one. # Becase if connection which original talesmethod uses is closed, # RuntimeError must occurs in __setstate__. tales_expr = copyMethod ( tales_expr ) return TALESValue ( tales_expr ) , isCacheable ( tales_expr ) override = self . overrides . get ( id , "" ) if override : override = copyMethod ( override ) return OverrideValue ( override ) , isCacheable ( override ) # Get a normal value. value = self . get_orig_value ( id ) value = copyMethod ( value ) cacheable = isCacheable ( value ) field_id = field . id if id == 'default' and ( field_id . startswith ( 'my_' ) or field_id . startswith ( 'listbox_' ) ) : if field . meta_type == 'ProxyField' and field . getRecursiveTemplateField ( ) . meta_type == 'CheckBoxField' or self . meta_type == 'CheckBoxField' : return DefaultCheckBoxValue ( field_id , value ) , cacheable return DefaultValue ( field_id , value ) , cacheable # For the 'editable' value, we try to get a default value if id == 'editable' : return EditableValue ( value ) , cacheable # Return default value in callable mode if callable ( value ) : return StaticValue ( value ) , cacheable # Return default value in non callable mode return_value = StaticValue ( value ) ( field , id , * * kw ) return return_value , isCacheable ( return_value )