Method: HTableView#appendRow

Defined in:
lib/hwidgets/htableview.rb

#appendRow(sourceTr = nil) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/hwidgets/htableview.rb', line 18

def appendRow(sourceTr = nil)
  
  colorIndex = @fieldTable.rowCount() % 2 unless colorIndex
  sourceTr = @tr[colorIndex] unless sourceTr
  tr = sourceTr.copyConstructor
  self.fieldTable.fields.each do |fieldName, fieldValue|
    tr.appendChild(HWidget.new("td", " ")) if(fieldValue.visible)
  end
  self << tr
  return tr

end