vaadin

Html contents in a vaadin label

两盒软妹~` 提交于 2019-12-12 20:19:15
问题 Is it possible to draw html contents in vaadin label? I have texts with <br> contents. Is it available to let the label to use them? 回答1: Yes, you can use the 2 argument constructor of Label and set the ContentMode to HTML . Something like, new Label(YOUR_HTML_TEXT, ContentMode.HTML); From the Javadoc (linked above): Label component for showing non-editable short texts. The label content can be set to the modes specified by ContentMode The contents of the label may contain simple formatting:

Consume available space in Vaadin Gridlayout, but consider line breaks

一个人想着一个人 提交于 2019-12-12 18:28:18
问题 I use Vaadin's GridLayout for visualization of some title and value labels. The GridLayout has 2 columns and several rows. Title labels are on the left side and their associated value labels on the right. I want the first column to consume as less space as possible and the second column should occupy all the remining space of the browser's window. If a value label requires more space than available then it must break the line. I tried to play with setColumnExpandRatio() . If I determine

How to fix object set in grid?

▼魔方 西西 提交于 2019-12-12 18:20:44
问题 In my application i have a class like: public class Team { private Country teamId; private Set<Player> playerSet; private Set<Player> substitutes; private Set<Coach> coachSet; } When i instantiate a grid like: Grid<Team> grid = new Grid<>(Team.class); and set allTeam() from database it shows object for playerSet and coachSet. My question is i just want to show players name and coach name concate by ,or \n. Any idea how can i do that?As a beginner it is complicated for me 回答1: I see three

Vaadin DateField saves null value to database

岁酱吖の 提交于 2019-12-12 16:47:48
问题 I'm using VAADIN 8 and struggling with a problem. I've bind all fields on FormLayout and want to save values ​​from these fields in a db. All fields are filled with values. The essence of the problem is that the DateField value is sent as null when the object is saved to the database The question is why DateFiled has null value and how to win the problem? VAADIN v.8.6.2 Entity (simplified): @Entity @DynamicInsert @DynamicUpdate @Table(name = "Orders") public class Order{ @Id @GeneratedValue

BND puts the same package to both export and import sections of manifest.mf

余生长醉 提交于 2019-12-12 14:39:35
问题 I have a Vaadin application, which I'm trying to build as a set of OSGI bundles using Maven + BND. I can't deploy the bundles To Apache Felix because some dependencies can't be resolved. Apache Felix complains that can't find package XYZ required by bundle "A", although this package is defined in this same bundle!! I looked at the MANIFEST.MF file generated by Maven + BND and saw that the package (XYZ) from this bundle is added to both "import" and "export" sections. I understand why "export"

Change Maven-driven project based on Vaadin 11 to Vaadin 12 alpha version?

我们两清 提交于 2019-12-12 14:11:47
问题 Problem I have a working project in IntelliJ 2018.3 for Vaadin 11, created using the Project Base starter-pack. ➥ How do I switch from Vaadin 11.0.0 to Vaadin 12.0.0.alpha4 ? My Question here is similar to this one, Vaadin 8 alpha/beta prerelease fail with “Non-resolvable import POM: Failure to find” errors. The solution on that page was to enable a vaadin-prerelease checkbox in the Profiles list in the Maven sidebar of IntelliJ. But with a Vaadin 11 project, the only such checkbox found

How to create a complex header in vaadin 7?

坚强是说给别人听的谎言 提交于 2019-12-12 12:15:09
问题 I was using setColumnHeader(Object, String) to set a simple string as a column header. I want to create a complex header. I would like to know if there is any way to build a similar table as shown in the below figure in Vaadin 7. http://i.stack.imgur.com/u5dIw.gif 回答1: Now it is possible using Grid: // Group headers by joining the cells HeaderRow groupingHeader = grid.prependHeaderRow(); HeaderCell namesCell = groupingHeader.join( groupingHeader.getCell("firstname"), groupingHeader.getCell(

Adding hint to TextField

孤人 提交于 2019-12-12 12:15:00
问题 I want to add a TextField with an integrated hint text, a user prompt, a placeholder until the user enters text. The prompt text disappears when the TextField is focused and re-appears if the TextField loses focus and no text is entered. I initially thought that this would be a generic feature for Vaadin TextFields but that doesn't seem to be the case. Now I'm looking for a way to implement my own extension of the TextField to add this feature. But I'm stuck. My question is if anyone here has

Vaadin can't find my themes

感情迁移 提交于 2019-12-12 11:45:20
问题 I've got below error: INFO: Requested resource [/VAADIN/themes/mytheme/styles.css] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder. I'm using intellij. Here is my folder structure: My mytheme.scss: @import "../valo/valo.scss"; @mixin mytheme { @include valo; .v-button { color: blue; background: yellow; } } My styles.scss: @import "mytheme.scss"; @import "addons.scss"; .mytheme { @include mytheme;

Display error messages directly in Vaadin 7

▼魔方 西西 提交于 2019-12-12 11:35:09
问题 I'm developing a web app in Vaadin, which involves a large number of forms. Currently, all the screens have been created, and I ran them past a couple of test users (4) to checkout their usability. All of them had one and the same comment; when a validation error occurred, it was not clear what the problem was. None of them thought about hovering their mouse over the error indicator (if they even noticed the indicator) to get the precise error message. I read in the Book of Vaadin that the