vaadin

How to determine if a DateField is valid in Vaadin 8

允我心安 提交于 2019-12-11 07:00:01
问题 I have: DateField dateField = new DateField("Date"); Button submitButton = new Button("Submit"); submitButton.addClickListener(click -> handleClickListener()); where in handleClickListener() I want to prevent a submit if there is a validation error in the DateField . I know I can use a Binder and then binder.validate() but this form has no backing object and I just want a simple form. How can I do something like: if(!dateField.isValid()) // no further processing else // process I can't find

Liferay 7 and Vaadin 8: Vaadin Shared is not active

自作多情 提交于 2019-12-11 06:58:17
问题 I'm try to install a module with a vaadin portlet. When the bundle started throws the following exception. Does any one knows how to check if Vaadin Liferay Integration is active? or my module needs to activate atuomatically? thanks 2018-08-30 17:45:07.745 INFO [Refresh Thread: Equinox Container: b06cd3dd-72ac-0018-1cb3-ebc69224d879][BundleStartStopLogger:35] STARTED com.smart.services.vaadin.test_1.0.0.SNAPSHOT [979] 2018-08-30 17:45:07.755 ERROR [Refresh Thread: Equinox Container: b06cd3dd

Vaadin 7 - instant download of dynamically created file

依然范特西╮ 提交于 2019-12-11 06:05:59
问题 My scenario is: using Vaadin 7.7.10 , I have on click generated file, that I want to download once it is generated. I have generator method, that returns byte[] (could be also easily modified to any OutputStream if needed), then I create StreamResource from it. So I have the resource ready to be downloaded, but now what? I believe can't use approach with FileDownloader , because there I would have to generate the file every time the page is displayed prior to actual click on extended button

Button hover effect not showing after button is clicked/focused

旧城冷巷雨未停 提交于 2019-12-11 05:53:56
问题 I'm developing a web application using the Vaadin framework. I have a Button styled as BaseTheme.BUTTON_LINK and have an icon showing. The button is assigned a CSS class which has a hover state, when the button is hovered the icon is replaced. Simple enough. However, I find that once the button is clicked, the hover stops working until you click elsewhere. The button seem to be focused after clicking and then the hover effect doesn't work. Does anyone know a way to work abound this, either

Not able to save uploaded file on server using GOLANG and POLYMER http: no such file

不羁岁月 提交于 2019-12-11 05:32:09
问题 I am using vaadin upload to upload files on web application with polymer. And I am using golang for back-end. <vaadin-upload target="../upload" max-files="20" accept="application/pdf,image/*" method="POST"> </vaadin-upload> I checked that encoding type used in vaadin upload is multipart/form-data . My golang code is below. func upload(w http.ResponseWriter, r *http.Request) { fmt.Println("method:", r.Method) if r.Method == "GET" { crutime := time.Now().Unix() h := md5.New() io.WriteString(h,

Deploying Vaadin App in Openshift

给你一囗甜甜゛ 提交于 2019-12-11 05:29:12
问题 I just created my first Vaadin application. The application works fine on my local server. I want to upload this app to Openshift. I followed the instructions here: https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear The app has been uploaded, but the only thing that is displayed is text. No panels or CSS or anything. Does anyone have any idea why this is happening? Thank you! Console: Jul 01, 2014 8:39:50 AM com.vaadin

Center widgets within a layout in Vaadin Flow

血红的双手。 提交于 2019-12-11 05:21:10
问题 When I have small widget such as a LoginLayout within another layout appearing in a much larger window, how can I center the content? I want the content to appear approximately in the middle of the window with respect to both width and height. I found older Questions on this topic such as this and this, but they are for the previous generation of Vaadin (versions 6, 7, 8) before Flow (versions 10+, now 14). 回答1: HorizontalLayout with CSS3 Flexbox The trusty HorizontalLayout and VerticalLayout

How can I receive the input of the changed fields in Vaadin?

混江龙づ霸主 提交于 2019-12-11 05:15:03
问题 My Vaadin application provides a little table, which is editable. If the user - after changing some fields - clicks on the save button, I will receive all the rows and save the changed rows into the database. // create a bean item container val writers: BeanItemContainer[Person] = new BeanItemContainer[Person](classOf[Person]) // create some person objects writers.addBean(new Person("Thomas", "Mann", 1929)) writers.addBean(new Person("W. B.", "Yeats", 1923)) writers.addBean(new Person("Günter

Spring boot with vaadin run jetty even though I use tomcat

ぐ巨炮叔叔 提交于 2019-12-11 05:09:24
问题 I try to use Spring boot with Vaadin 7.7.0. By default, spring boot use tomcat if I don not specify. However, I found there is a log as below: 2016-08-26 12:08:49.897 INFO 3240 --- [ main] e.j.JettyEmbeddedServletContainerFactory : Server initialized with port: 8080 2016-08-26 12:08:49.900 INFO 3240 --- [ main] org.eclipse.jetty.server.Server : jetty-8.y.z-SNAPSHOT I check the dependency through eclipse and there is no jetty. Here is the dependency for the problem How could a such strong

Ignore 'styles.scss.cache' file for version control in a Vaadin 8.1 project?

ぃ、小莉子 提交于 2019-12-11 04:48:07
问题 After doing the first Maven install on my new Vaadin 8.1 project created from the vaadin-archetype-widget Maven archetype, and first running my app, I noticed a single new file appeared: myproject-demo/src/main/webapp/VAADIN/themes/demo/styles.scss.cache ➠ Does it make sense to include or ignore this file from my version control? By ignore , I mean add that filename to my list of file/folders to big ignored by my version control system. ( .hgignore file) If I intend to share this project as