最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Component renderer for vaadin grid - Stack Overflow

programmeradmin0浏览0评论

I would like to switch from vaadin table to the everywhere praised grid but i don't know how to overe limitation that grid cannot render ponents. In the table I have column that displays HorizontalLayout with dynamic number of buttons. Grid allows to use Button renderer but it means only one button will be rendered in each column and I need it more flexible. Perhaps I could write my own Rendere to support what I need but it requires some lower level/gwt/javascript programming and I am not sure if the desired result is even achievable. Dear vaadin guys, what do you remend?

I would like to switch from vaadin table to the everywhere praised grid but i don't know how to overe limitation that grid cannot render ponents. In the table I have column that displays HorizontalLayout with dynamic number of buttons. Grid allows to use Button renderer but it means only one button will be rendered in each column and I need it more flexible. Perhaps I could write my own Rendere to support what I need but it requires some lower level/gwt/javascript programming and I am not sure if the desired result is even achievable. Dear vaadin guys, what do you remend?

Share Improve this question asked Dec 2, 2015 at 7:29 vingavinga 2,01222 silver badges33 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 5

I just finished a ponent renderer for the grid. It is fully functional, but not tested in production scenarios. It is a start and I hope people are joining the development.

https://vaadin./directory#!addon/ponentrenderer

https://github./datenhahn/ponentrenderer

The ponent support is a feature that I'd love to see in Grid as well. Getting to low level GWT stuff really breaks the abstraction and it will cause head aches especially for maintenance. If there is nothing special in Grid that you need, I'd just use Table. It's still supported for a long time and probably more stable than Grid which is still quite new beast.

Alternatively you could try using this experiment, which actually brings a ponent support to Grid. I haven't yet tried it, but it looks promising:

https://vaadin./directory#!addon/beangrid-add-on

ComponentRenderer now available in Vaadin 8.1

Update: Vaadin 8.1 now supports having a ponent as the content of your Grid cell.

This feature is currently listed as # 1 on the list of the What’s New page.

Starting with 8.1, you can render any Vaadin UI ponent, such as Buttons, CheckBoxes, TextFields, or custom ponents, inside Grid's cells. In previous versions, you needed to write these using client side code or pre-defined Renderer classes.

See video.

See Sampler demo.

See the guide, scrolling half-way down for ComponentRenderer.

In related news, Grid now has new HTML5-based Drag-and-Drop support, and there is a new TreeGrid widget.

发布评论

评论列表(0)

  1. 暂无评论