vaadin8

Vaadin HybridMenu shift with scrollpanel

流过昼夜 提交于 2019-12-25 11:58:08
问题 I want to add scrollbar to my web app so I can see every components on my browser. Red rectangle in picture below is Grid. Grid is placed inside class that extends VerticalLayout and implements View. Green color shows my scrollbar which is added to HybridMenu instance. HybridMenu root = HybridMenuBuilder.get() .setContent(new VerticalLayout()) .setMenuComponent(EMenuComponents.LEFT_WITH_TOP) .setConfig(menuConfig) .build(); root.addStyleName("scrollpanel"); root.setSizeFull(); super

Vaadin 8 alpha/beta prerelease fail with “Non-resolvable import POM: Failure to find” errors

谁说胖子不能爱 提交于 2019-12-25 02:18:59
问题 I have not been able to try the alpha and beta versions of Vaadin 8. ➥ What exactly do I need to do to change a working Vaadin 8.5.2 project to use Vaadin 8.6.0beta1 ? Scenario I am using IntelliJ 2018.3, configured to use external Maven 3.5.4. I followed the instructions seen at: https://vaadin.com/framework/releases/8.6.0.beta1 Actually, my POM already had the pair of <id>vaadin-prereleases</id> entries as shown on that page: <repositories> <!-- ... --> <repository> <id>vaadin-prereleases<

Vaadin 8: How to show ProgressBar window before navigating to other view with long loading

荒凉一梦 提交于 2019-12-24 20:59:22
问题 I want to navigate to a view that displays large data in a grid after a button click. I know there is lazy loading but I want to load all data to be able to sort by clicking the header. With lazy loading I could only sort one column. Button viewDataBtn = new Button("View scan data"); viewDataBtn .addClickListener(e -> { UI.getCurrent().getNavigator().navigateTo("scandataview/" + name); }); This does work but there is a long break until the new view is visible. Therefore, I want to show a

How to set width for Vaadin Label with empty string

自作多情 提交于 2019-12-24 19:55:29
问题 According to the documentation if you have an empty Label (a Label with an empty string) the width will collapse to 0. That being said the documentation also says: "If you want a gap that has adjustable width or height, you can use an empty label if you specify a height or width for it" However when I do this the width still collapses to 0. I need the width to keep it's size because I use a different color for the background. 回答1: For me adding style to whatEverIsTheStyleName.scss that

Vaadin DateField validation does not show validation errors

故事扮演 提交于 2019-12-24 12:18:13
问题 Hello I'm using Vaadin 8 and im trying to use Vaadins DateField for user input. private DateField date = new DateField("Date of Birth"); ... binder.forField(date).asRequired("Some Warning").withValidator(new DateValidator()).bind(Person::getDateOfBirth, Person::setDateOfBirth); The DateValidator checks if the Person is at least 18 years old. The Problem is that if I use the Datepicker, that is integrated in the DateField no validation error is shown to the user if the Person is younger than

Vaadin -layout resizing overlaps

旧巷老猫 提交于 2019-12-24 00:38:46
问题 Im facing overlaps problem with my project when trying to resize browser. I was trying so many different variations to make it work, but still result is not acceptable. Before resizing: A , B and C are contained in VerticalLayout - I will call it root . Root is inside HorizontalLayout - content of UI . A is simple component. B is extending VerticalLayout that contains 2 HorizontalLayouts inside. C is only one component - Grid. Now, when Im trying to resize my browser (like arrow shows) C is

Vaadin: value from DateField is null after conversion

蓝咒 提交于 2019-12-24 00:28:42
问题 I faced with problem that I'm incapable to save typed date in the DateField to the database. I'm using Hibernate as ORM framework and there is Order entity that has java.sql.Date fields. But as far as I know DateField works only with LocalDate/LocalDateTime. So then in order to bind those fields I created Converter class. The problem was that the Converter received a null value and that's why I got a stacktrace, but the issue was solved in this thread: Vaadin DateField saves null value to

Java/Vaadin - FormLayout custom hidden component implementation

我们两清 提交于 2019-12-13 17:14:22
问题 I am working on a web application in vaadin and am currently trying to implement an address book. I viewed the official implementations off github and tried to build off that. The issue I am experiencing is with the contact form. I want to be able to click a row in the grid and open up a form containing the information. (Similar to how it is done on their example) The component doesn't react as intended however. If I added the component directly to the main layout and try to toggle visibility

Pass information to new web-browser window/tab being opened with BrowserWindowOpener in Vaadin 8

不羁岁月 提交于 2019-12-13 04:33:19
问题 In Vaadin 8, we can let the user open a new tab/window within their web browser by clicking a button that has been associated with a BrowserWindowOpener. As discussed in the manual, a new UI is instantiated on our behalf. All we pass is a .class object, the class of our UI subclass to be instantiated for display in the new window/tab. For example: BrowserWindowOpener opener = new BrowserWindowOpener( PersonDetailUI.class ); That works for me. My question is: How do I pass some information to

What purpose is served by the `SerializableFunction` interface defined in Vaadin 8 if we can simply pass a regular Lambda expression in its place?

时光总嘲笑我的痴心妄想 提交于 2019-12-13 03:47:56
问题 Vaadin 8 defines a functional interface, SerializableFunction. This interface appears in various places. For example, when defining a Converter for displaying non-textual types in a TextField such as a UUID. Binder.BindingBuilder<BEAN,TARGET>::withConverter(SerializableFunction<TARGET,NEWTARGET> toModel, SerializableFunction<NEWTARGET,TARGET> toPresentation) See class documentation. Example usage: binder .forField( this.idField ) .withConverter( text -> UUID.fromString( text ) , uuid -> uuid