'Method to resolve this form element against the calling resource.
@param resource: the resource
@return: a tuple (self, None, Field instance)'

def resolve(self, resource):

    selector = self.selector
    if (selector not in resource.components):
        hook = current.s3db.get_component(resource.tablename, selector)
        if hook:
            resource._attach(selector, hook)
        else:
            raise SyntaxError(('Undefined    component:    %s' % selector))
    component = resource.components[selector]
    permitted = current.auth.s3_has_permission('read', component.tablename)
    if (not permitted):
        return (None, None, None)
    options = self.options
    if ('name' in options):
        self.alias = options['name']
        label = self.alias
    else:
        self.alias = 'default'
        label = self.selector
    if ('label' in options):
        label = options['label']
    else:
        label = '    '.join([s.capitalize() for s in label.split('_')])
    fname = self._formname(separator='_')
    field = Field(fname, 'text', comment=options.get('comment', None), default=self.extract(resource, None), label=label, represent=self.represent, required=options.get('required', False), requires=self.parse, widget=self)
    return (self, None, field)
