vaadin

How to Add Language flags in Vaadin 10 Combo box

女生的网名这么多〃 提交于 2019-12-31 03:15:12
问题 How to Add Language flags in Vaadin 10 Como box 回答1: You can use comboBox.setRenderer() to build your own layout that will be used. comboBox.setRenderer(new ComponentRenderer<HorizontalLayout, MyLanguageClass>(language -> { HorizontalLayout layout = new HorizontalLayout(); layout.add(new Image(language.getPathToFlag(), language.getName())); layout.add(new Label(language.getName())); return layout; })); This example will do a basic HorizontalLayout with an Image and a Label. You can of course

Both ENTER shortcut and TextArea in Vaadin

五迷三道 提交于 2019-12-31 01:58:09
问题 TextField f = new TextField(); Button b = new Button("Save"); b.setClickShortcut(KeyCode.ENTER); // For quick saving from text field itself TextArea longText = new TextArea(); // "Enter" is garbled here Hot to make the shortcut to work only in the from text field? 回答1: Use focus and blur listeners to remove and add the shortcut key: f.addFocusListener(new FocusListener() { @Override public void focus(FocusEvent event) { b.setClickShortcut(KeyCode.ENTER); } }); f.addBlurListener(new

How to change style of combo box in Vaadin 10

牧云@^-^@ 提交于 2019-12-30 14:46:35
问题 I would like to adapt a combo box component's CSS. The combo box has my style class custom1 added which should disable border radius for left corners. In my shared-styles.html , I tried to adapt CSS properties: .custom1 { --lumo-border-radius: 0px; } This is changing the styles but it is not exactly what I want. According to docs, I should follow this wiki to apply local scope styles for the web component. So, I tried: <custom-style> <style> ... </style> </custom-style> <dom-module id="my

Vaadin 8 : reload grid with data from server every 1min

谁说我不能喝 提交于 2019-12-30 06:56:16
问题 I am trying to have a auto refresh feature for the grid which basically, updates the grid with latest data from the server every 'n' seconds. I was able to implement the PollListner whenever the user enables Auto-Refresh. UI ui= TestUI.getCurrent(); Boolean value = isRefreshChkBox.getValue(); PollListener listener = e -> { explorer.reloadUI(); }; if (value) { String refreshRateValue = refreshRateTxtField.getValue(); int refreshRate = Integer.valueOf(refreshRateValue); int millis = (int)

Should I use Vaadin Framework [closed]

旧时模样 提交于 2019-12-29 10:06:42
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I just tried to play with Vaadin Framework and it seems to me very easy to use. Plus what I like about his framework is that it is built on top of Google Web Toolkit (GWT). What do you think, should I continue using this framework or it's better to stick with GWT? 回答1: Hey.

Doubleclick listener on Vaadin Grid

心已入冬 提交于 2019-12-25 18:09:20
问题 How do I add a 2x click listener on a vaadin grid? When I 2x click on it, it takes me to another page. Example would be most appreciated. 回答1: With the MouseEvent you can simply ask for a double click. See here #MouseEvents.ClickEvent.html#isDoubleClick() 回答2: Here is an example: grid.addItemClickListener(listener -> { if (listener.getMouseEventDetails().isDoubleClick()) // pass the row/item that the user double clicked // to method doStuff. doStuff(l.getItem()); } ); 来源: https:/

handleURI for http://AAA.BBB.CCC.DDD:8080/myapp/ uri: '' returns ambigious result (Vaadin 6)

折月煮酒 提交于 2019-12-25 16:28:33
问题 In my Vaadin 6 application I sometimes get the following error: SEVERE: Terminal error: java.lang.RuntimeException: handleURI for http://AAA.BBB.CCC.DDD:8080/myapp/ uri: '' returns ambigious result. at com.vaadin.ui.Window.handleURI(Window.java:432) at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleURI(AbstractCommunicationManager.java:2291) at com.vaadin.terminal.gwt.server.CommunicationManager.handleURI(CommunicationManager.java:370) at com.vaadin.terminal.gwt.server

How to open a vaadin combobox programmatically

允我心安 提交于 2019-12-25 12:47:51
问题 I have implemented a poor-mans-searchbox using a combobox. The search expression is typed into the textfield and the user press enter. Then the search expression is added to the combo model, this is caught in the eventhandler which then runs the search, empties the combo list and populates it with the searchresults instead. However, the user then need to open the combo list manually (by pressing the little down-arrow) to see the result. It'd be nice to open the list automatically, but I haven

vaadin 8 + spring custom widgetset

空扰寡人 提交于 2019-12-25 12:09:54
问题 i am trying to get working client-side component with class with spring+vaadin boot. The problem is probably in custom widgetset. Where should be placed in project? close to client component? Resouces (cant compile while in resources) But my client component is not getting called onStateChange. I have tryed everyting but i cant handle it. gwt package { client { connector extended by AbstractExtensionConnector with @Connect directivy ClientSide class with java } AppWidgetset.gwt.xml } impl {

vaadin 8 + spring custom widgetset

两盒软妹~` 提交于 2019-12-25 12:09:13
问题 i am trying to get working client-side component with class with spring+vaadin boot. The problem is probably in custom widgetset. Where should be placed in project? close to client component? Resouces (cant compile while in resources) But my client component is not getting called onStateChange. I have tryed everyting but i cant handle it. gwt package { client { connector extended by AbstractExtensionConnector with @Connect directivy ClientSide class with java } AppWidgetset.gwt.xml } impl {