You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

myBeanJsRenderer.js 538B

12345678910111213141516
  1. window.com_vaadin_tests_components_grid_MyBeanJSRenderer = function() {
  2. this.init = function(cell) {
  3. cell.element.setAttribute("column", cell.columnIndex);
  4. }
  5. this.render = function(cell, data) {
  6. cell.element.innerHTML = 'Bean(' + data.integer + ', ' + data.string + ')'
  7. }
  8. this.getConsumedEvents = function() { return ["click"] };
  9. this.onBrowserEvent = function(cell, event) {
  10. cell.element.innerHTML = "Clicked " + cell.rowIndex + " with key " + this.getRowKey(cell.rowIndex) +" at " + event.clientX;
  11. return true;
  12. }
  13. }