'Resolve a field name against the table, recognizes "id" as
table._id.name, and "uid" as current.xml.UID.
@param table: the Table
@param fieldname: the field name
@return: tuple (Field, Field.Method)'

@staticmethod
def _resolve_field(table, fieldname):

    method = None
    if (fieldname == 'uid'):
        fieldname = current.xml.UID
    if (fieldname == 'id'):
        field = table._id
    elif (fieldname in table.fields):
        field = ogetattr(table, fieldname)
    else:
        field = None
        try:
            method = ogetattr(table, fieldname)
        except AttributeError:
            pass
    return (field, method)
