vaadin7

Vaadin - How to open BrowserWindowOpener from a SINGLE BUTTON

谁都会走 提交于 2019-12-23 02:22:11
问题 In the Vaadin example of how to print a dynamically generated PDF they have a two step approach, first you click on the OkButton and then the PrintButton . The problem is that their code to open the PDF relies on creating a new BrowserWindowOpener which then extends the Print button in the ClickListener for the OKButton . In other words they have: okButton.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { // Dynamically generate PDF - this is greatly

Vaadin - How to open BrowserWindowOpener from a SINGLE BUTTON

不问归期 提交于 2019-12-23 02:22:05
问题 In the Vaadin example of how to print a dynamically generated PDF they have a two step approach, first you click on the OkButton and then the PrintButton . The problem is that their code to open the PDF relies on creating a new BrowserWindowOpener which then extends the Print button in the ClickListener for the OKButton . In other words they have: okButton.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { // Dynamically generate PDF - this is greatly

Programmatically select a row in Grid in Vaadin 7?

早过忘川 提交于 2019-12-23 01:14:07
问题 In the Grid widget in Vaadin 7.5.3, we can determine the current selection of rows by calling SelectionEvent::getSelected or Grid::getSelectedRows. So how do we set the selection programmatically? 回答1: While that's true that official documentation for Grid class doesn't have this method stated, still you can do it programmatically. I won't argue whether it's a bug or not. Firstly you need to know what is your SelectionMode . Then you can select a row (or rows): @Override protected void init

How to set custom font icon when using a Vaadin declarative UI?

帅比萌擦擦* 提交于 2019-12-23 00:29:07
问题 I am using a custom font icon set as described at the wiki article Font icons in Vaadin 7.2. Everything works fine. However, if I use the declarative UI I am not able to get it working. This is my code so far: <vaadin-panel caption="..." style-name="..." icon="fonticon://IcoCustom/58884" size-full> UPDATE Allowed syntax: font://INDUSTRY (deprecated syntax, assumes FontAwesome font icon) fonticon://FontAwesome/f275 (font family/codepoint in hex. decimal values not allowed) fonticon:/

How to run Vaadin 7 applications in Karaf?

岁酱吖の 提交于 2019-12-22 18:29:24
问题 I have been looking for days now, with lots of experiments, for an answer to this question. What do I need to do to be able to run applications, using version 7 of Vaadin Web framework, inside Karaf? There are some information about it but none of the solutions I read worked. The only related question I found on SO (How to integrate Vaadin 7 with OSGi?) does not really have an valid answer, at least for my question. Every time I follow a solution found by googling I always get lots of missing

How to display checkboxes instead of boolean in vaadin grid?

佐手、 提交于 2019-12-21 15:18:09
问题 I'm trying to display my boolean values as a checkbox in a vaadin grid. I can't use the multi selection mode because i need two columns with checkboxes. The columns of the Checkboxes shell have a Caption but the Checkboxes itself shell be without a caption. Does anyone have an idea ? 回答1: You have to add generated columns for your checkboxes GeneratedPropertyContainer gpcontainer = new GeneratedPropertyContainer(container); gpcontainer.addGeneratedProperty("columnName", new

How to specify a button to open an URL?

左心房为你撑大大i 提交于 2019-12-21 08:23:47
问题 I want to write a web application that triggers the default email client of the user to send an email. Thus, I created a Link, that leads to an URL conforming to the mailto URI scheme (http://en.wikipedia.org/wiki/Mailto): Link emailLink = new Link("Send Email", new ExternalResource("mailto:someone@example.com")); However, instead of using a Link, I want to provide a Button that allows to trigger the respective functionality. But, for buttons I cannot set an ExternalResource to be opened.

How to specify a button to open an URL?

余生颓废 提交于 2019-12-21 08:23:14
问题 I want to write a web application that triggers the default email client of the user to send an email. Thus, I created a Link, that leads to an URL conforming to the mailto URI scheme (http://en.wikipedia.org/wiki/Mailto): Link emailLink = new Link("Send Email", new ExternalResource("mailto:someone@example.com")); However, instead of using a Link, I want to provide a Button that allows to trigger the respective functionality. But, for buttons I cannot set an ExternalResource to be opened.

Want to have a layout which arrange in a tabular form

假装没事ソ 提交于 2019-12-20 04:31:31
问题 I am very new to Vaadin. My requirement is like in my page I need to have 4 input component per row. There would be 4 rows like this. I need a layout which will allow me to define number of columns and keep align it. There should not be any border like we have in table. Please suggest me any suitable layout and how can I customize that. Thanks 回答1: You are probably looking for a GridLayout, it provides enough flexibility to size your grid 'cells', maintain consistency and set expand ratios

Vaadin 7 fire custom events between components

泄露秘密 提交于 2019-12-20 02:34:24
问题 I want to create custom events and fire them in some part of the view such that some other part of the view is updated/removed/refreshed. I have tried by extending the Component.Event and Component.Listener but it doesn't work. I think that events and listeners mustbe limited to the same component instance. Can this be done with Vaadin 7? Basically I want to decouple my views and provide easy communication between components. I'm also using Spring with Vaadin. If you have better ideas beside