Menu
  • HOME
  • TAGS

I cannot instantiate my bean using @Inject and Vaadin CDI

java-ee,vaadin,cdi,vaadin7

In the constructor class variables are not yet injected. The bean will be injected after initialising, so it is null in the constructor. You have 2 possibilities. Inject the bean in the Constructor. Use the bean in an init method annotated with @PostConstruct I'd recommend the second approach. Here you...

How to create a real time validator on a text field in Vaadin?

java,vaadin,vaadin7

This straight forward workaround solution seems to work fine although it is quite inelegant. textField.setTextChangeEventMode(TextChangeEventMode.LAZY); textField.setNullRepresentation(""); textField.addTextChangeListener(new FieldEvents.TextChangeListener() { @Override public void textChange(FieldEvents.TextChangeEvent event) { try { textField.setValue(event.getText()); // workaround cursor position problem textField.setCursorPosition(event.getCursorPosition()); textField.validate(); } catch (InvalidValueException e) {...

Disabling Vaadin table tooltip while loading

vaadin,vaadin7

just use css: .v-table-scrollposition{ display: none !important;} ...

Label disappears on GridLayout in Vaadin

java,label,vaadin,grid-layout,gridlayoutmanager

Set Width To Undefined Adding a Label to a GridLayout is a special and annoying case. Discussed in the forums. Technically a “feature”, not a bug. A Label has its width set by default to 100%. Inside a GridLayout, the Label needs to be of "undefined" width. This line will...

How to horizontally align component with CSSLayout in Vaadin7?

css,vaadin,vaadin7

Use float and text-align properties to align components inside CssLayout. SSCCE: @Override protected void init(VaadinRequest request) { setContent(addUpperStripe()); } private Component addUpperStripe() { CssLayout cssLayout = new CssLayout(); cssLayout.setWidth("100%"); cssLayout.setStyleName("csslayout"); Label userNameLabel = new Label("LEFT"); userNameLabel.setSizeUndefined(); cssLayout.addComponent(userNameLabel); userNameLabel.setStyleName("leftPosition"); Label dateLabel = new Label("MID"); dateLabel.setSizeUndefined();...

How do I setup a working Vaadin project with Maven and run it with Jetty?

maven,jetty,vaadin

I guess you have ran into a problem where instructions were for an old archetype version, where of the archetype was updated to a new version a month or so ago, but the instructions talk about the old one. The big difference is that the archetype was made into a...

Vaadin demo animation : How to create similar animation

jquery,animation,vaadin,vaadin7

There is no code sample and jQuery is not used. The animation uses two concurrent CSS transitions rotating/scaling to opposite directions. It is non-trivial to get right and not all the browsers can do it at all (for those only scaling is used instead of rotation).

How to use the new Vaadin Spring Boot addon together with Vaadin4Spring EventBus

spring,vaadin,vaadin4spring

The problem is that VaadinSessionScope is not implemented yet in official spring4vaadin. You need to create that bean thought the unofficial spring4vaadin. Your pom file: <!-- Official Vaadin4Spring --> <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-spring</artifactId> <version>${vaadin.spring.version}</version> </dependency> <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-spring-boot</artifactId>...

Vaadin beanItemContainer property is array: how to get the data from the array

arrays,grid,vaadin

The answer to this question can be found at: https://vaadin.com/forum#!/thread/9934386...

Is it possible to shadow Vaadin Applicaitons

java,gwt,vaadin

well, although it could be possible to have this feature in Vaadin, it is not implemented right now, nor planed. Vaadin RPC mechanism maintains synchronised set of states between the user session in server side and javascript in client side. In theory it could be possible to code some kind...

How to integrate Vaadin 7.3.9 into a Grails project in Eclipse?

eclipse,grails,vaadin

Don't use the install-plugin method. Place this in the plugins section in BuildConfig.groovy: compile ":vaadin:7.4.1" From what I understand from the plugin author, the newer versions of the Vaadin/Grails plugin no longer create the grails-app/vaadin directory. Instead, you're now expected to place your vaadin code in the typical src/groovy or...

Using HTML template inside Vaadin application

java,html,templates,vaadin,vaadin7

It's possible to get the generated HTML from client side and transfer it to the server by creating your own client-side extension or by using this example: Dumping the Screen. But if you want to create templates for you emails I suggest to use an approach where you use a...

Trying to run a Vaadin Project in IntellijIdea using gwt-graphics-1.0.0 jar file

gwt,vaadin

GWT Graphics is a GWT library, which means that it doesn't work with the server-side API of Vaadin. If you want to use it with Vaadin, you need to create your own component, and use GWT Graphics on the client side of that component.

Read and write cookies with @Push

vaadin,vaadin7

As mentioned in the ticket, you can use JavaScript to call client code and also request a cookie value back by that. E.g. @Grapes([ @Grab('org.vaadin.spring:spring-boot-vaadin:0.0.3'), @Grab('com.vaadin:vaadin-server:7.4.0.beta1'), @Grab('com.vaadin:vaadin-client-compiled:7.4.0.beta1'), @Grab('com.vaadin:vaadin-themes:7.4.0.beta1'), ]) import com.vaadin.ui.* @org.vaadin.spring.VaadinUI @groovy.transform.CompileStatic class MyUI extends UI { protected void init(com.vaadin.server.VaadinRequest request) { final resultLabel = new Label() //...

How can I localize the text used as tool tips of vaadin richtext area?

gwt,vaadin,vaadin7

Try Vaadin Addon - Wrapper for CK Editor. Here you can find online demo. It automaticaly localizes to my browser language. You can find more information on official CKEditor site....

button is displayed odd on the page using vaadin

vaadin

The problem is that you are using the default reindeer theme, which assumes that button's height is undefined. In your markup you define 50px height for your button. The fix is remove the height attribute from the markup or use another theme that supports buttons with different heights.

implement RPC for a GWT widget inside Vaadin

gwt,vaadin,vaadin7

Looks like you're using or at least importing com.google.gwt.user.client.rpc.RemoteService from a Vaadin (i.e. server side) class. This is a client-only interface that is not supposed to be used server side.

Vaadin Table Object returns null, though it exists - modify toString()?

java,vaadin

You can simply use Object.hashCode() or if you really need to use toString you can override it: Table table = new Table(){ final Long hexcode = new java.util.Random().nextLong(); @Override public String toString(){ return hexcode.toString(); } }; System.out.println("table: " + table); ...

Disable the web browser’s spell check feature on specific Vaadin fields

vaadin,vaadin7

One can use the great Attributes add-on by Michael Vogt to inject the spellcheck attribute to any Vaadin component. Usage: Attribute attribute = new Attribute("spellcheck", "false"); attribute.extend(myTextField); ...

Vaadin Valo theme: remove border around focused elements

vaadin,vaadin-valo-theme

Preferred way is to edit Valo theme Sass variables, its easy and detailed info can be found in this Vaadin wiki article. Basically you make your custom theme which inherits from vaadin Valo theme and override only variables you are interested in. So you can override only variable for font...

open popup through Link in Vaadin

vaadin

As explained in in Book of Vaadin - Components - Link, Link should be used only for hyperlinks to external resources, as it is nothing more than a wrapper for a anchor html tag and as such it does not fire any server side events. As a result you cannot...

Vaadin: Force CSS-containers to fit full width after animation

html,css,responsive-design,vaadin,vaadin7

I figured out how to solve the problem with a combination of styling and Java code. The button click event resizes the .sidebarContainer cssLayout. When the sidebar is toggled invisible, the layout width is set to 0. The sidebar container adapts two animation CSS classes for the opening and closing...

How to implement upload component with one upload button in Vaadin?

java,upload,vaadin

Button.setImmediate(true) is used to start upload after file selection (without button click). But you still need to hide the button with CSS. Quote from Book of Vaadin 5.25 Upload: You can also hide the upload button with .v-upload .v-button {display: none} in theme, have custom logic for starting the upload,...

change background color of a Layout - Vaadin

vaadin

Sounds like you are on the right track. I noticed in your css you did not end the background-colour with a semi colon. (May have just been a typing error). It could be that your theme is not compiling correctly. Check that you have included a mixin definition in your...

Get user’s IP address, and other client-side info in Vaadin 7 web app

vaadin,vaadin7

Vaadin WebBrowser The WebBrowser class in Vaadin 7 provides an easy way to access information about the client’s computing environment. Access a WebBrowser object via the current Page object. WebBrowser webBrowser = Page.getCurrent().getWebBrowser(); IP Address The getAddress method provides the apparent IP address of the client computer/device. String ipAddress =...

java.lang.VerifyError when using vaadin and vaddin-server

java,vaadin,vaadin7,verifyerror

You cannot combine Vaadin 6 and Vaadin 7 that way. If you want to use features from Vaadin 7 you need to migrate the whole application to use Vaadin 7. If you want to execute some JavaScript from server side, Vaadin 6 has the Window.executeJavaScript() method that you can try...

Vaadin Adding Javascript to Custom Layout

javascript,vaadin

Its not possible to call it directly from your html layout. Notice that your custom html file its only a layout thus Vaadin generates his own html using your layout AND server side code. Thats why your <script> annotation is not only redundant - it is simply useless. However its...

Database table update in vaadin

java,mysql,database,sql-update,vaadin

I guess you are using DateField for date. Default date format of MySql is YYYY-MM-DD while your dateTextField.getValue() will return Date Object and default toString representation of Date will be concatenated in your query.So,both formats are different and your query executes successfully but can not detect the row with date...

Vaadin panels not displaying correctly

vaadin

HorizontalLayout mainlayout = new HorizontalLayout(); mainlayout.setSizeFull(); Panel sidepanel = new Panel(); sidepanel.addStyleName(ValoTheme.PANEL_BORDERLESS); Panel content = new Panel(); content.addStyleName(ValoTheme.PANEL_BORDERLESS); mainlayout.addComponent(sidepanel); mainlayout.addComponent(content); mainlayout.setExpandRatio(sidepanel, 2); mainlayout.setExpandRatio(content, 8); ...

Avoid Panel resizing on TextField Validator error - Vaadin

java-ee,vaadin

assuming, that you actually want to have both the required and the componentError there, you would have to give them some room to breath. one way could be to just set a width for the horizontal layout, that is larger than two times the textfields and the markers. with a...

Deploy vaadin 7 war file in EC2

amazon-ec2,tomcat7,vaadin,war,vaadin7

Solved!... To install the manager: sudo yum install tomcat7-webapps tomcat7-docs-webapp tomcat7-admin-webapps To solve the Java Version mismatch, org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/prueba2]]: On Eclipse: Preferences >> Java >> Installed JREs On EC2 server: sudo yum remove java-1.7.0-openjdk sudo yum install java-1.8.0 Then reinstall Tomcat7 and restart Thanks @BlunT for...

Remove element-ID's from Vaadin components in production mode

html,vaadin,production-environment,vaadin7,test-environments

You can check if you are currently running in Vaadin Production Mode like this VaadinService.getCurrent().getDeploymentConfiguration().isProductionMode(); So if you are setting your components id with setId() method, you can easily set it only when not in production mode, for example: boolean isProductionMode = VaadinService.getCurrent().getDeploymentConfiguration().isProductionMode(); if(!isProductionMode) { foo.setID(FOO_ID); } But I would...

Vaadin missing icons of all components

icons,vaadin,font-awesome,vaadin-valo-theme

We changed the Java version of the project form 1.7 to 1.6. That solved the problem.

Styling the titles in Vaadin Charts

java,vaadin,vaadin7,vaadin-charts

Theme The various Theme controlling the look of the charts vary widely in their sizing. The new Valo themes (ValoLightTheme and ValoDarkTheme, matching Vaadin’s new Valo theme) tend to be much larger than the previous default, VaadinTheme (matching Vaadin’s Reindeer theme). So one easy way to change sizes of chart...

vaadin-maven-archetype - Why does it generate three modules?

maven,vaadin,vaadin7

From the generated README.md: parent project: common metadata and configuration xxx-widgetset: widgetset, custom client side code and dependencies to widget add-ons xxx-ui: main application module, development time xxx-production: module that produces a production mode WAR for deployment For background: with Vaadin you essentially develop web applications with server-only Java code....

Vaadin (self contained) portlet (Liferay) with Javascript (d3js)

javascript,maven,d3.js,liferay,vaadin

I have solved my issue a couple of weeks ago and I post my solution if someone has a similar problem. In the main UI class you have to add an Anootation referring to your used Javascript libraries. For example in my case, I had to add my MyPorletUI.java: @Theme("mytheme")...

How to make a new line in error message in RegexpValidator in Vaadin

vaadin

Simplest way (without extending Vaadin's client component VErrorMessage) is to use preformated text and use CSS rule for it. For new line in java use: \n And add style rule in used style.css file (example for all tooltip error messages): .v-tooltip .v-errormessage { white-space: pre; } ...

vaadin setItemCaptionPropertyId more then one caption in combobox

java,vaadin

You can set the item caption on the combobox itself using ItemCaptionMode.EXPLICIT and combo.setItemCaption(id, caption) or add a read only property to your bean: public class SubCategoryDTO { private String name; private CategoryDTO parent; public String getCaption() { return parent.getName() + " " + name; } } and use ItemCaptionMode.PROPERTY...

Displaying Same Data Aross Multiple Clients Using Push in Vaadin 7 app

java,vaadin,vaadin7,web-push

Fully-Working Example Below you will find the code for several classes. Together they make a fully working example of a Vaadin 7.3.8 app using the new built-in Push features to publish a single set of data simultaneously to any number of users. We simulate checking the database for fresh data...

Programmatically run vaadin extesion

java,vaadin

FileDownLoader starts file downloading only when it's clicked on by the user, meaning that you cannot trigger it from your code. Reason for this is that some browser show security warnings when download is started from indirect user action.

Vaadin layout break line without panel

layout,label,line,vaadin,break

I had exactly this problem, and managed to solve it using this CSS. Vaadin Labels have the CSS attribure white-space: nowrap which is what is stoping your text wrapping as you expect it to. .v-label { white-space: normal; } ...

How to add custom font and custom font size in a Vaadin RichTextArea

vaadin,richtextarea

There is no "server-side" way to handle this (up to including Vaadin 7.4). As the Book of Vaadin states: RichTextArea inherits TextField and does not add any API functionality over it. You can add new functionality by extending the client-side components VRichTextArea and VRichTextToolbar. So now have a look at...

Error when to compile my theme with vaadin 7.3 and valo theme

java,vaadin,vaadin7

I just found the solution. Need to replace <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiled</artifactId> <version>${com.vaadin.version}</version> <scope>provided</scope> </dependency> with <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiler</artifactId> <version>${com.vaadin.version}</version> <scope>provided</scope> </dependency> in pom.xml for...

Vaadin TableExport addon does not handle Label component directly

java,vaadin,vaadin7

I have never used the TableExport addon but I have two solutions in my mind: Use String as a property type: table.addContainerProperty("Skill", String.class, null); Create your own extended Label and override the toString() method to return the value you want to see in exported excel sheets. ...

Parallel AJAX calls in Vaadin javascript extension

javascript,ajax,multithreading,vaadin,vaadin7

The webserver doesn't process requests from the same client in parallel to prevent any race conditions or locking issues. To process long running requests you need to do it asynchronous to the thread that processed the request. When it is finished, write the result back to the UI, using UI.access(...)....

Listener not starting method properly

java-ee,vaadin

If you are running above code asynchronously, then the client will only happen to know about the state change eventually. If you want to notify the client about the change, when it happened, then you would have to do this via Server Push. If the user is damned to wait...

Handling more complex forms

forms,vaadin

Handling of valueChange events in Vaadin is a bit of pain, since it always fires, no matter if the user has changed something, or the application has used setValue(....) on the component. The only solution for this is to remember when you do a setValue(....) in your application and then...

What does this error “SEVERE: Server sent Vaadin 6 style updates for Connector…but this is not a Vaadin 6 Paintable” mean in Vaadin 7?

java,gwt,vaadin

You extend on the server side the PasswordField class, which extends AbstractTextField and AbstractTextField implements the com.vaadin.ui.LegacyComponent interface. LegacyComponent makes easier to convert Vaadin components from Vaadin 6 to Vaadin 7 and most of the core components are converted that way. When server-side class implements the LegacyComponent interface, the connector...

Java 8 - return List (keyset) opposed to List>

java,java-8,vaadin

You can add a map call to extract the key from the Entry : List<Integer> keys = checkBoxes.entrySet().stream().filter(c -> c.getValue().getValue()).map(Map.Entry::getKey) .collect(Collectors.toList()); ...

Vaadin - How to have two columns of data (Gridlayout with field and Label data with wrapping text)

java,java-ee,vaadin,vaadin7

The answer was a combination of things. First the biggest tip I can offer is to look at Consume available space in Vaadin Gridlayout, but consider line breaks After that the code above was using setCaption() when it should've been using setValue(). Combining these two things resolved the issue and...

Vaadin label gets hidden if other layout component is set to expand

vaadin

The Button has undefined size by default. So space will be shared by the 100% sized Label (by default) with expand ratio of 0 and the excess space of the Button cell with expand ratio 1. So all space is given to the excess space of the button. Set the...

ServerRpc not working in a custom Vaadin Widgetset, why do I get "Widgetset '…' does not contain implementation for '…'?

gwt,widget,vaadin,rpc

I have resolved, the problem was that MarqueeLabelServerRpc needed to be inside the widgetpackage.client package and not widgetpackage.

GWT MouseOverHandler and MouseOutHandler horrible result, element keeps fire mouse over and mouse out events at the same time?

gwt,vaadin,mouseover,mouseout

This has nothing to do with gwt. You are hiding the widget, when the mouse is over it. When the element hides, the mouse is not over it anymore and so the mouseOut event is triggered, which makes the widget visible again. This will trigger the mouseOver event again and...

Is there a ui-component for vaadin that I can use for text highlighting?

javascript,vaadin,vaadin7

Some options: Rich text area: https://vaadin.com/book/-/page/components.richtextarea.html Context menu: https://vaadin.com/directory#!addon/69 I made a quick demo project with a rich text area & a context text area. In the bottom text area I have right clicked & you can see a context menu appears with "Insert" & "Clean". This is customisable &...

Vaadin basic layout: fixed header and footer + scrollable content

java,layout,header,vaadin,footer

You can use a Panel to create a scrollable center content area. E.g. (see XXX) @Grapes([ @Grab('org.vaadin.spring:spring-boot-vaadin:0.0.3'), @Grab('com.vaadin:vaadin-client-compiled:7.4.0.beta1'), @Grab('com.vaadin:vaadin-themes:7.4.0.beta1'), ]) import com.vaadin.ui.* @org.vaadin.spring.VaadinUI class MyUI extends UI { protected void init(com.vaadin.server.VaadinRequest request) { final headerLayout = new VerticalLayout(new Label('HEADER')) final footerLayout = new VerticalLayout(new Label('FOOTER')) final contentLayout = new...

Security Context Returning Null value in Web App

spring,spring-security,vaadin

Ensure that you have something like <filter> <filter-name>springSecurityFitler</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSeurityFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> in your web.xml descriptor file. See http://docs.spring.io/spring-security/site/docs/4.0.x/reference/html/security-filter-chain.html for more info. Also...

Send selected row data in table to next page (Vaadin)

java,table,vaadin

You can get the select row with the getValue() method of the table. This returns you the itemId of the selected row. The rest should then not be a problem...

How to fit Sencha GXT table in to the Div it contains

vaadin,gxt

http://docs.sencha.com/gxt-guides/3/concepts/appearance/Appearance_3.html Here's a link to the docs, basically it follow the GWT paradigm, if you've seen it before. But since you want to integrate GXT Grid in a Vaadin widget I'd like to ask about your needings. I know the standard Vaadin seems a little.."poor"..but I encourage you to check...

Making Table columns from database as hyperlinks in vaadin

vaadin

I got it. Link link = new Link(String.valueOf(rs.getInt(1)), new ExternalResource("#")); _reportTable.getItem(dashboardDataRowId) .getItemProperty("todo").setValue(link); Now the Link is coming, but i need to display the pop up when user clicks on link. ...

How Vaadin translates &Address to Alt+A using shortcut by a shorthand notation in AbstractField.FocusShortcut?

java,keyboard-shortcuts,vaadin,textfield,shorthand

From the ShortcutAction javadocs: Insert one or more modifier characters before the character to use as keycode. E.g "&Save" will make a shortcut responding to ALT-S, "E^xit" will respond to CTRL-X. Multiple modifiers can be used, e.g "&^Delete" will respond to CTRL-ALT-D (the order of the modifier characters is not...

NPE in Vaadin7 Navigation with my own ViewProvider implementation.

java,exception,vaadin,vaadin7

Following up my original comment, you have not posted your MainView class fully but in it's constructor you're not assigning the Navigator navigator variable to a field nor passing it as a parameter to the createSubViewButtons method so you can use it there. If you have indeed a field called...

Updating ProgressBar using custom listener (interfaces)

interface,progress-bar,listener,vaadin,vaadin7

There is a thread on vaadin forum worth reading which summarizes this well - Updating UI from another thread: Vaadin consists of a server side that runs in a servlet container and a client side that runs in a web browser. The application state is kept on server side but...

How upload text file in Vaadin to textField?

upload,vaadin

When using the vaadin upload you should be able to use a ByteArrayOutputStream instead of a FileOutputStream. So just use the sample from the book of vaadin but use a ByteArrayOuputStream instead. When the uploadSucceeded method is called, you take the ByteArrayOutputStream, convert it into a string (Beware of the...

changes in style.css reset when clean install vaadin-maven project

java,maven,vaadin

The stuff in styles.css is compiled by sass compiler from inherited themes (Valo in most recent version) and from your application specific styles.scss. You should consider it as the ".class" file where ".scss" files are your themes ".java" files. If you want to fall back from the "sass magic" to...

Vaadin and JPARepository: transaction errors

java,spring-boot,vaadin,spring-data-jpa,vaadin7

If anyone needs the answer I'll leave here what I found out after a few days of breaking my head on it. Before deploying the application I changed some configurations on the main class that was generated by Spring Initializr (The application one) and made it extend SpringBootServletInitializer because I...

Why when I run a project created with Maven on Jetty it is not found (404)?

maven,jetty,vaadin

You are most likely trying to run jetty in a wrong folder. Try in the vaadin-in-maven-arch-ui folder instead. Also instead of jetty:start try with jetty:run....

How display several Vaadin properties in a single table cell?

vaadin,vaadin7

You would implement a Table.ColumnGenerator for this. Then create the content for the cell there. The content can be "any" vaadin Component. Either use e.g. Label with HTML content and concat your props with <br/> (be aware of XSS!). Or you can also create a vertical layout and add a...

How manage styles in Vaadin portlet in Liferay

css3,liferay,vaadin,portlet

I found solution, wich is not perfect, but still enough for my purposes: 1.Do copy Valo Theme from vadin-themes-7.0.5..jar as explained on http://www.rapidpm.org/2014/05/25/vaadin-valo--the-new-theme-%28since-vers.html 2. Edit styles.css in valo root theme. 3. Add !important clause into .valo .v-textfield {..} class definition as written on http://www.liferay.com/community/forums/-/message_boards/message/15001322 for border-radius and height. It changes...

How to use the new multiple projects created for a new project in new version 1.1.3 Vaadin Plug-in For NetBeans

maven,netbeans,project,vaadin,vaadin7

I'm not sure if you still need help with this but one of the things you may have missed is the README that appears in the directory of your new Vaadin project. I'll go through the process in as much detail as I can since I'm sure someone else probably...

How to access `ServletContext` from within a Vaadin 7 app?

servlets,vaadin,vaadin7

VaadinServlet The VaadinServlet class inherits a getServletContext method. To get the VaadinServlet object, call the static class method getCurrent. From most anywhere within your Vaadin app, do something like this: ServletContext servletContext = VaadinServlet.getCurrent().getServletContext(); CAVEATDoes not work in background threads. In threads you launch, this command returns NULL. As documented:...

How i can load image from WEB-INF dir [Openshift:Vaadin]

java,tomcat,resources,vaadin,openshift

I was fix this problem. Solution is: pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="..."> ... <build> <resources> <resource> <directory>src/main/resources</directory> </resource> <!-- ADD THIS --> <resource> <directory>src/main/webapp/WEB-INF</directory> </resource> </resources> ... </build> </project> java.class private Image rankImage = new Image(); rankImage.setSource(new...

Vaadin UI does not refresh

hibernate,user-interface,push,vaadin,jpacontainer

Thanks for notifying me Jan :) I managed to achieve what I want, maybe it is a bit hacky, because I had to put a tiny logic into the salary model: In the setter of salary type I set the tax too and the UI updates immediately.

How to adjust GridLayout row height dynamically?

java,vaadin,grid-layout

To overcome this situation, I chose CustomLayout with html template. through this way I got very easy control over my grid or in other word Table. mylayout.html (VAADIN/themes/mythemes/layouts) <table class="tg"> <tr> <td class="tg-031e tg-0ord">Key1</td> <td class="tg-031e" location="Key1_value"></td> <td class="tg-031e tg-0ord">Key2</td> <td class="tg-031e" location="Key2_value"></td> <td class="tg-031e" colspan="2" rowspan="9" location="image_value" style="width: 245px;">...

Vaadin @Javascript : clear cache for updated JS file

javascript,vaadin

As I noted in my comment on the question on January 12th, renaming the file worked. This seems to be currently the only way, although it's far from ideal.

D3 events firing on a hidden svg element

javascript,firefox,svg,d3.js,vaadin

This is just a bug in Firefox. If you report it I'll fix it. Given a specific value for pointer-events we can say exactly whether the element should receive events or not. If we don't know what value pointer-events has then the element might or might not receive pointer events....

Reduce white space within a chart in Vaadin Charts 2

java,vaadin,vaadin7,vaadin-charts

First Orange Box The first orange box is not actually white space within the chart. Or, if it is, I do not know how to change it. Second Orange Box The second orange box is "margin" on the Title element. You can call the setMargin method on the Title object....

Trying to get an “eraser” working with the HTML5 Canvas and Vaadin, but it just clears

javascript,html5,canvas,vaadin

I claim no knowledge of vaadin, but in general, for composition you should use the destination-out mode to clear something existing with what you draw on top. copy will as you discovered just copy, so everything existing will be cleared as 0-bytes are copied over. Try: canvas.setGlobalCompositeOperation("destination-out"); ...

Vaadin attach class to Page?

java,testing,mockito,vaadin

Vaadin UI class creates and owns Page instance. You can set your mock with reflection but be careful because you might end up implementing a lot of Page class functionality in your mock, depending how much your application uses Page or framework in general. If you want to mock out...

Expand content to fill DIV and at the same time “stay” within div - vaadin 7

html,vaadin

You should not use CSS padding with VerticalLayout, that breaks Vaadin layouting as you can see. Instead of that you should either enable spacing or marging for the layout by saying layout.setSpacing(true); or layout.setMargin(true); If you want to modify default Vaadin spacing or margin values for your VerticalLayout, its possible...

Vaadin and independent JavaScript Events

javascript,jquery,javascript-events,vaadin,vaadin7

Any ideas or better solution will be welcome. That's how batman would do it (code first, explanation later): @SuppressWarnings("serial") @Theme("so5") @JavaScript("batman.js") public class So5UI extends UI { @WebServlet(value = "/*", asyncSupported = true) @VaadinServletConfiguration(productionMode = false, ui = So5UI.class) public static class Servlet extends VaadinServlet { } @Override protected...

vaadin 7 - move data between sub windows

vaadin

You can either bind all your components which acces shared data to same model, using Vaadin Data Binding or you can use Events to propagate value changes from subwindows to whichever component may be concerned. Consider using Model View Presenter pattern to structure you view layer. There is a nice...

How to run Vaadin 7.3.9 Projects having IvyDE and Annotation servlet configuration with RunJettyRun in Eclipse?

java,eclipse,jetty,vaadin

Create a new Vaadin 7 Project with Servlet API 3.0 using the wizard Resolve dependencies and compile everything Select Run as/Debug as -> Run/Debug Configurations Select Jetty Webapp -> New launch configuration Select a Jetty Version: -> 8.x or newer (required for Servlet API 3.0) Hit Run/Debug ...

VaadIN combox BeanContainer

java,vaadin

final BeanItemContainer<SimpleBean> container = new BeanItemContainer<>(SimpleBean.class);//create a container for beans container.addBean(new SimpleBean("Some string"));//add bean to the container container.addBean(new SimpleBean("Some string 123")); final ComboBox combo = new ComboBox("choose", container);/*create a combo box with caption "choose". the second argument is the datasource - this is the place from where the combo...

Vaadin: how to avoid cascade valuechange events between fields

events,recursion,field,vaadin,onchange

Usually we do set a flag when we trigger the first valueChangeEvent() and then ignore all others, until the first trigger is finished processing. The pseudocode looks like this: private boolean _ignoreTriggers= false; // Set ignore triggers when we do manual setValue stuff field1.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent...

vaadin delete row on keyboard event

java,vaadin

You need to use ShortcutListener: table.setSelectable(true); table.addShortcutListener(new ShortcutListener("", KeyCode.DELETE, new int[10]) { @Override public void handleAction(Object sender, Object target) { table.getValue(); //returns selected rows if (getKeyCode() == KeyCode.DELETE) { System.out.println("Merry Christmas"); } } }); ...

“Cannot initialize context because there is already a root app…” when a Jetty auto-restart occurs after a change in the code Spring Vaadin?

java,spring,jetty,vaadin

You are using run-jetty-run, that doesn't do reload/restart the same way as you are expecting. Note: run-jetty-run is not a jetty tool or project, its a 3rd party tool with no committers in common with core jetty. Either use the jetty-distribution, or jetty-maven-plugin, or jetty-runner and you'll have better luck,...

Vaadin FormLayout formatting

java,gwt,vaadin,vaadin7,vaadin-touchkit

I'm not 100% certain if I get what you're trying to do, but you might be able to achieve this through custom CSS. It is hard to write out the exact CSS since it would require seeing the HTML generated by Vaadin and testing it with that, but it would...

count items in a column vaadin

java,vaadin

Columns don't contain items, Rows contain items. You can set the visible columns by passing a array to the setVisibleColumns methos of the Table. It could also be a idea, to just colapse the column, not hiding it... Determining if all values of this colum are empty should be simple...

VaadIn Visual Designer - panel issue

java,eclipse,vaadin,vaadin7

Solved it. I took an instance of the generated file but you need to use the extended class .. . public class Login extends LoginDesign implements Button.ClickListener { private static final long serialVersionUID = 1L; private UI mainUI; private ClickListener listner = this; public Panel createLoginPanel(UI mainUI) { this.mainUI =...

Vaadin CheckBox object becomes null

java,vaadin

You said yourself mycb doesn't actually become null. That's great. if (mycb != null && mycb.getValue() == true) This throws a NullPointerException because Java tries to cast the result of mycb.getValue() to a boolean. But because mycb.getValue() returns null, it throws a NullPointerException. Change it to: if (mycb.getValue() != null...

Why do I get a Communication proble… when I click on a button in a UI created after a Link was clicked in the previous UI?

java,user-interface,vaadin

A few notes on how to resolve such an issue if someone comes across the same problem I faced. The problem was the mapping of the VaadinServlet responsible for showing the ShortcutUI: In a nutshell, this: @WebServlet(value = "/Shortcut", asyncSupported = true) Should become this: @WebServlet(value = "/Shortcut/*", asyncSupported =...