Class: HDBFilterView
Instance Attribute Summary
Attributes inherited from HWidget
#tag
Instance Method Summary
collapse
Methods inherited from HWidget
#_addJsSlot, #_set, #_setStyle, #addJsFunction, #appendChild, #appendChilds, #buildSignature, #closeTag, #connect, #copyConstructor, #get, #getChilds, #getElementBy, #getSystemProperty, #hotLog, #openTag, #replacePlaceholder, #reset, #set, #setChilds, #setCloseTag, #setClosedTag, #setEnablePlaceholder, #setInnerHTML, #setParent, #setPlaceholder, #setPlaceholders, #setProperties, #setSlots, #setStyle, #setStyles, #setSystemProperties, #setSystemProperty, #setTag, #storeSlots, #storeStyle, #strProperties, test, #unset, widgetSpace
Constructor Details
#initialize(sourceView: nil, **args) ⇒ HDBFilterView
Returns a new instance of HDBFilterView.
3
4
5
6
7
8
|
# File 'lib/hwidgets/hdbfilterview.rb', line 3
def initialize(sourceView: nil, **args)
@sourceView = sourceView
return super(class: 'hdbfilterview', **args)
end
|
Instance Method Details
#applyFilter(value: 'true') ⇒ Object
10
11
12
|
# File 'lib/hwidgets/hdbfilterview.rb', line 10
def applyFilter(value: 'true')
return @sourceView.html(filter: value)
end
|
#filter ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/hwidgets/hdbfilterview.rb', line 14
def filter
div = HDivTag.new(class: 'filter-box')
div << HWidget.new("span", "Filter:")
div << filter = HWidget.new("input", class: 'filter', type: 'text', value: "",
onkeypress: "hdbFilterView.keyPress(this, event)")
filter.connect(:onblur, self, "applyFilter", id: @sourceView.oid, attributes: ":obj.value")
return div
end
|
#html ⇒ Object
23
24
25
26
|
# File 'lib/hwidgets/hdbfilterview.rb', line 23
def html
self << filter
return super
end
|