vaadin

Servlet Exception + Class Cast Exception + Glassfish + Netbeans + JPA Entities + Vaadin

帅比萌擦擦* 提交于 2019-12-10 17:01:49
问题 I get this error: StandardWrapperValve[Vaadin Servlet]: PWC1406: Servlet.service() for servlet Vaadin Servlet threw exception java.lang.ClassCastException: com.delhi.entities.Category cannot be cast to com.delhi.entities.Category when I try to run my webapps on glassfish v2. Category is a JPA entity object the offending code according to the server log is: for (Category c : categories) { mymethod(); } categories is derived from: List<Category> categories = q.getResultList(); Any idea what

Vaadin audio element doesn't work when I use it to play .m4a sound files (Vaadin 7.3.2)

不羁的心 提交于 2019-12-10 16:52:13
问题 I use this to display html5 audio in one of my Vaadin application. When I simply requst the data in browser, and save the file, it can be played - but it always fails to do so, when I try it in Vaadin. Can you point out, what am I doing wrong? public class AudioArea extends Audio { public AudioArea(final int soundId) { super(); StreamResource resource = new StreamResource( new StreamResource.StreamSource() { public InputStream getStream() { byte[] data = MyVaadinUI.request.getBinaryData(

Translating GWT MVP Pattern to Vaadin

一个人想着一个人 提交于 2019-12-10 15:25:48
问题 After several months developing an application based on GWT, using MVP pattern + Hibernate, I've come to a point where every small change in the application is a pain, and the widgets look very poor. I've also evaluated Vaadin, and it looks very promising. The way that databinding allows me to forget DTO conversion, seems interesting, but also the final result looks very professional, so I'm almost convinced to redo the work with Vaadin. The point, is that I like very much the code cleanness

Type inference failed: Not enough information to infer parameter Please specify it explicitly

眉间皱痕 提交于 2019-12-10 14:15:04
问题 I'm trying to write a Vaadin application in Kotlin. For data binding, Vaadin 8 now provides a possibility for type safe data binding. In Kotlin I would have expected work like that: class LoginModel { var username: String = "" var password: String = "" } class LoginView : FormLayout() { val name = TextField("name") val password = TextField("password") val loginButton = Button("login") init { val binder = Binder<LoginModel>() binder.forField(name).bind( { it.username }, { bean, value -> bean

Cannot run mvn vaadin:compile on Vaadin Maven project

橙三吉。 提交于 2019-12-10 13:56:50
问题 When I run the command : mvn vaadin:compile I get this error : [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.039s [INFO] Finished at: Thu Mar 20 11:35:00 CET 2014 [INFO] Final Memory: 7M/152M [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'vaadin' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available

Server-side GWT events; alternative to Vaadin

左心房为你撑大大i 提交于 2019-12-10 13:49:16
问题 I'm wondering is there a similar framework like Vaadin built on top of GWT which wraps the original GWT components but with server-side only event handling? (I know that Vaadin is built on top of GWT. I'm looking for an alternative solution.) Vaadin is nice because of it's precompiled nature. I found compile times with GWT horrific the last time i've worked with it. Also it's a bit easier to maintain security if event handling code runs on the server. It would be nice if the standard GWT

How to refresh a single row in a table?

删除回忆录丶 提交于 2019-12-10 13:36:24
问题 Is it possible to refresh a single row of a vaadin table component? So far, if table row editing is finished, I'm just refreshing the whole table: table.refreshRowCache(); But that will probably cause performance issues later for large tables. So, how could a single row be refreshed? 回答1: I found this on the Vaadin forum which seems useful: https://vaadin.com/forum/#!/thread/408555/408554 I haven't yet given it a go but, Henri Sara (Vaadin developer) suggested this solution: Property

Vaadin framework play video

非 Y 不嫁゛ 提交于 2019-12-10 13:10:46
问题 Can I play video using Vaadin framewotk ? The main idea is loading video files from local drive in flv or avi formats and play it in web using vaadin framework. Thanks. 回答1: There is a sample in the Sampler: http://demo.vaadin.com/sampler/#FlashEmbed You can see the source by clicking 'view source', and it will show you something like this: Embedded e = new Embedded(null, new ExternalResource( "http://www.youtube.com/v/meXvxkn1Y_8&hl=en_US&fs=1&")); e.setMimeType("application/x-shockwave

How to set a border on a Vaadin component?

陌路散爱 提交于 2019-12-10 12:53:35
问题 I would like to programmatically set a border around a Form component in Java. How can I do this without having to edit the css style sheet? 回答1: You could wrap the form with a Panel component, which has a border defined already. Otherwise, not much alternatives than just using CSS. One option, if you wish to stay inside the server environment, is to use the CSSInject add-on and add the border using that (you still need to write CSS, but you can do it on the server in a Java file and not

Vaadin - Expand components in Grid Layout in Vaadin

≯℡__Kan透↙ 提交于 2019-12-10 12:44:15
问题 I am doing my project in Vaadin 6. In that, I have integrated the components in a Grid layout. I have attached a image with this. It resembles my Project layout. It is similar to eclipse. So, The layout will have two side panels on left and right. and a center and bottom panel. And the red color in the image are buttons. When I press them the panel will be minimized. I want the center panel to expand and occupy the minimized panel's area. I have integrated the panels in grid layout. Can