Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Custom layout and table
Background for questions:
I have data from database. I have to present that in table. Tables layout isn't basic vaadin layout, I have to modify
the table layout a lot. Lets say that layout should be like this http://vaadin.com/forum/-/message_boards/category/11558 (vaadin forum), with image and button. Overall in my project, I have basicly overwrite all the vaadin css themes.
What are the best solutions for that.
1. Modifying Table ui element? Adding static(on the java side, layout is static) widths and heights for columns, headers and so. Is there some way to show browsers original right click?
2. Making the table by Custom Layout. Is data binding easy to do?
3. Start using gwt, and making own widget? Project time is quite a short, so no time to start learing new technigues.
4. Other solutions.
Thanks for answers
Hi, Pete !
Why do you want to tweak the layouts, doesn't Vaadin's built-in widget Table meet your requirements ?
I have my on graphical desing on project, and Table have to look like that, thats way I have to tweek it. Basically it is like website look, and I think Vaadins own look is like application? What do you think? Any hints for tweeking?
You can tweak table's widget CSS to fit your design. Create your empty theme which inherits "reindeer" one, then add overrides for original table's CSS selectors.
If you could show an example on how your table should look, we can say if this can be done by CSS-ing it or something else is also needed.
I am on iPhone now, so i can't send sample, but in the first message I said that it looks like vaadin Forum post list.
The VaadinTunes layout demo does some table theming that might be a little similar to what you want (alternating colors for the rows, some header customization, removing the table body border).
It is based on the older runo theme, though, so some changes might be required to make it work with reindeer.
Thanks for the answer, it could be solution. By the way is there any way to add static widths for the columns and headers in Java side, and how can you turn on browsers rightClick?
Pete, yes, you can set column widths explicitly from java code.
Under browser's right click - you mean to be able to popup a native browser's menu (view source, etc..) ?
Yeah I ment that popup a native browser's menu (view source, etc..)
native right click already works when clicked on a table header (just tested with my app). Regarding the table body, did not tried this ever, so probably Vaadin guys will answer on this possibility in more details.
BTW, for what operation do you need the native right click on a table ? The "view source" will not work with Vaadin or plain GWT, as you'll only the boot html page with a small JS snipped and nothing else, and cannot not remember another thing which could be done with the native popup menu.
I don't need it, but I was wondering it. =)
Thanks for answer.
Ah, I see now ;)
regarding the table theming - you can also look inside vaadin.jar, into the reindeer theme css files for table - reindeer theme also contains several styles for a table - see the substyles demo: http://demo.vaadin.com/ReindeerTheme