'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
    input_class = self._input_class
    input_labels = self.input_labels
    input_elements = DIV()
    ie_append = input_elements.append
    _id = attr['_id']
    _variable = self._variable
    selector = self.selector
    for operator in self.operator:
        input_id = ('%s-%s' % (_id, operator))
        input_box = INPUT(_name=input_id, _id=input_id, _type='text', _class=input_class)
        variable = _variable(selector, operator)
        value = values.get(variable, None)
        if (value not in [None, []]):
            if (type(value) is list):
                value = value[0]
            input_box['_value'] = value
            input_box['value'] = value
        ie_append(DIV(DIV(LABEL(current.T((input_labels[operator] + ':')), _for=input_id), _class='range-filter-label'), DIV(input_box, _class='range-filter-widget'), _class='range-filter-field'))
    return input_elements
