vaadin

Vaadin 7 add buttons into Accordion com.vaadin.ui.TabSheet.Tab caption

早过忘川 提交于 2019-12-12 04:25:49
问题 Is it possible to add a buttons in Vaadin 7 to Accordion com.vaadin.ui.TabSheet.Tab caption ? Right now I can only add a String into Tab caption. This is my current screen: I need to add the same Edit/Remove icons(as I have for Live Chat and WMA) near the General and Julia Group tab captions. 回答1: Unfortunately it's not possible. You could create a server-side composition, which behaves like Accordion but then you could design the component so that you can add buttons to tab captions. You

How to keep cursor on row when data is updated?

你说的曾经没有我的故事 提交于 2019-12-12 04:22:17
问题 The data in SPA should be updated periodically to show the current db state in the table. I'm trying to do it by the click event on a table row. table.addListener( new Table.ValueChangeListener() { public void valueChange(final ValueChangeEvent event) { BeanItemContainer<Incoming> bic; Query query = sess.createQuery("..."); List l = query ... bic = new BeanItemContainer<Incoming>(l); table.setContainerDataSource(bic); } } ); But at this line the cursor is lost: table.setContainerDataSource

Vaadin 7 component lazy loading for performance improvement

血红的双手。 提交于 2019-12-12 04:13:16
问题 In my Vaadin 7 application I have a heavy view. Server side works pretty fast - all logic in my init() method takes ~100-150ms but rendering in the browsers takes a lot of time(depends on number of components). Right now it is ~10sec in order to display this view in Google Chrome. I'm looking for a way in order to optimize performance of this view. I found LazyLoadWrapper but it looks a little bit outdated. Is any similar to this component for Vaadin 7.6 in order to improve user experience

Vaadin is it possible to have different colors for text items in ComboBox

陌路散爱 提交于 2019-12-12 04:06:47
问题 For example in my ComboBox I want the expense items to be colored in red text and the revenue items to be colored in green text. How can I do this in Vaadin's ComboBox component, assuming I'm working from a BeanItemContainer ? 回答1: It's not possible with the ComboBox without any client-side modifications. It might be possible to develop your own Extension, that would do that. 来源: https://stackoverflow.com/questions/30948344/vaadin-is-it-possible-to-have-different-colors-for-text-items-in

How to add a vaadin theme from a library

☆樱花仙子☆ 提交于 2019-12-12 03:58:18
问题 I develop a vaadin library project. This library is used by several vaadin applications. The library has GUIs which can be used in applications. Currently, the styles for the GUIs in the library has to be manually added to the themes of depending applications. I am looking for a way go embed the styles in the library itself and use it just by a reference from the applications (just like the applications import the valo theme using following declaration). @import "../valo/valo"; .my-theme {

Is there a way to set a cell in grid in edit mode with Vaadin 8 grid

梦想的初衷 提交于 2019-12-12 03:53:59
问题 I have defined a grid like this using Vaadin 8: ListDataProvider<Value> gridDataProvider = new ListDataProvider<>(new ArrayList<>()); GridSelectionModel<Value> selectionModel; Grid<Value> grid = new Grid<>(Value.class); TextField editorField = new TextField(); editorField.setSizeFull(); Binder<Value> binder = new Binder<>(); binder.bind(editorField, Value::getValue, Value::setValue); Editor<Value> gridEditor = grid.getEditor(); gridEditor.setBinder(binder); gridEditor.addSaveListener(

Vaadin menu design - which component at the top?

北慕城南 提交于 2019-12-12 03:51:22
问题 I'll be doing an Eclipse workspace-like menu. Basically, the page will be split into 3 sections (columns)-- say LHS, MDDL & RHS sections. all of these 3 sections will be resizable, can be minimized/maximized. Each of these 3 sections will have their own components, depending on which menu item the user is on. One other thing they'll have is that events will be triggered/passed to/from between components in 2 different of these 3 sections. Eg.: when the user clicks an entry in the accordion

Vaadin Upload Component Upload Button, changing it's Style?

假如想象 提交于 2019-12-12 03:36:37
问题 Vaadin 7.6.2 How to apply setStyleName("small") on an Upload component’s upload button and have it work? If this requires custom CSS it would be great to see an example of what that looks like. This question is for the Upload Button, not the "browse" button, which has been hidden by setImmediate(true) in my case. 回答1: Use this scss for the small upload buttons: .v-upload-small .v-button { height: 31px; padding: 0 14px; font-size: 14px; border-radius: 4px; } And on the upload button use the

Vaadin Upload Button, CSS to change its color (same styles as Button)?

孤街醉人 提交于 2019-12-12 03:24:17
问题 Vaadin 7.6.2 What would be the CSS that would allow me to change the upload button's color to one of the following: danger , primary or friendly so that I may use setStyleName() in the same way as I do for a Button ? Ref: https://vaadin.com/docs/-/part/framework/components/components-button.html This Doc doesn't discuss the bug or fix: https://vaadin.com/docs/-/part/framework/components/components-upload.html But does say: The upload button has the same structure and style as a regular Button

Vaadin 7 - Bean Validation

a 夏天 提交于 2019-12-12 02:59:43
问题 I have been trying out Vaadin 7. Firstly, I must admin that I am quiet a noob at Vaadin and not much familiar with JAVA persistance. I am thus trying to learn bean validation and how to use it. I have followed couple of tutorials, but its really hard to decide which is the latest and correct one for Vaadin 7. Nonetheless, I tried downloading and using the JPA container and the BeanValidator and I can't get it working. Here is the code I am using: package com.example.firstvaadin; import java