'Render this widget as HTML helper object(s)
@param resource: the resource
@param values: the search values from the URL query'

def widget(self, resource, values):

    attr = self.attr
    _class = self._class
    if (('_class' in attr) and attr['_class']):
        _class = ('%s    %s' % (attr['_class'], _class))
    else:
        _class = _class
    attr['_class'] = _class
    _id = attr['_id']
    if resource:
        rfield = S3ResourceField(resource, self.field)
        field = rfield.field
    else:
        field = None
    if (not field):
        return ''
    step = self.opts.get('step', 1)
    _type = self.opts.get('type', 'int')
    field = str(field)
    fieldname = field.replace('.', '_')
    selector = self.selector
    _variable = self._variable
    for operator in self.operator:
        input_id = ('%s-%s' % (_id, operator))
        input = INPUT(_name=input_id, _disabled=True, _id=input_id, _style='border:0')
        variable = _variable(selector, operator)
        value = values.get(variable, None)
        if (value not in [None, []]):
            if (type(value) is list):
                value = value[0]
            input['_value'] = value
            input['value'] = value
    slider = DIV(_id=('%s_slider' % fieldname), **attributes)
    s3 = current.response.s3
    validator = field.requires
    if isinstance(validator, IS_EMPTY_OR):
        validator = validator.other
    _min = validator.minimum
    if isinstance(validator, IS_INT_IN_RANGE):
        _max = (validator.maximum - 1)
    elif isinstance(validator, IS_FLOAT_IN_RANGE):
        _max = validator.maximum
    if (values is None):
        value = 'null'
        script = ('i18n.slider_help="%s"' % current.T('Click    on    the    slider    to    choose    a    value'))
        s3.js_global.append(script)
    if (_type == 'int'):
        script = ("S3.range_slider('%s',%i,%i,%i,%s)" % (fieldname, _min, _max, step, values))
    else:
        script = ("S3.range_slider('%s',%f,%f,%f,%s)" % (fieldname, _min, _max, step, values))
    s3.jquery_ready.append(script)
    return TAG[''](input1, input2, slider)
