vaadin

Vaadin and Spring integration - @Inject doesn't work

我们两清 提交于 2019-12-07 00:20:30
I'm trying to integrate Vaadin with Spring. In my main Vaadin application class I have: public class MyVaadinApplication extends UI { @Inject private PrivatePersonBo privatePersonBo; @Override public void init(VaadinRequest request) { Layout layout = new FormLayout(); layout.setCaption("New Private Person"); setContent(layout); ApplicationContext appContext = new ClassPathXmlApplicationContext("resources/spring/Context.xml"); appContext.getBean(MyVaadinApplication.class); PrivatePersonBo privatePersonBo = (PrivatePersonBo) appContext.getBean("privatePersonBo"); PrivatePerson existingEmployee =

Vaadin redirecting to a URL from button click

荒凉一梦 提交于 2019-12-07 00:18:26
问题 I have searched for a long time, but I really cannot figure this out. How do I redirect the user to a new external link (e.g. www.google.com ) when they click a button in Vaadin? The only thing I have managed to do so far is to put the link into a link Link link = new Link("link", new ExternalResource("http://www.google.com")); Can anyone help me out with this please? 回答1: getUI().getPage().setLocation("http://www.google.com"); References: Page (Vaadin 7.2.1 API) and Vaadin application

Vaadin Grid Table: how to draw border for certain columns?

断了今生、忘了曾经 提交于 2019-12-06 16:02:57
I'm using Vaadins Grid table for data representation. Therefore I want to draw a thick line for the right border of the Employee -ID-column and for both border sides of the name or name and surname column. The result should look like this: How I can manage that? Morfic Continuing from where we left off in your other question regarding cell background , update your CellStyleGenerator to handle your other columns. For the sake of brevity I'll just demo a column with both borders, but you'll get the idea: grid.setCellStyleGenerator(new Grid.CellStyleGenerator() { @Override public String getStyle

Spring Security + Vaadin: How to create custom non-JSP login form?

橙三吉。 提交于 2019-12-06 15:59:41
问题 It's fairly easy to use custom JSP login page in Spring Security. Our application is based on Vaadin though and I don't want to have JSP login page. What I want is custom fancy login window created as Vaadin widget. Well technically I can use Vaadin's FormLayout and name fields like j_username and j_password ... but this is Java class and not JSP file, so what do I specify in http Spring Security element? I mean: <http auto-config='true'> <intercept-url pattern="/**" access="ROLE_USER" />

Vaadin - How to open BrowserWindowOpener from a SINGLE BUTTON

房东的猫 提交于 2019-12-06 15:52:33
In the Vaadin example of how to print a dynamically generated PDF they have a two step approach, first you click on the OkButton and then the PrintButton . The problem is that their code to open the PDF relies on creating a new BrowserWindowOpener which then extends the Print button in the ClickListener for the OKButton . In other words they have: okButton.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { // Dynamically generate PDF - this is greatly simplified. StreamResource pdfResource = new PdfStreamResource(); BrowserWindowOpener opener = new

Load test vaadin 7.0.4 return error No UIProvider

ぐ巨炮叔叔 提交于 2019-12-06 14:05:57
I would like to load test a vaadin app with 5000 users. I found this https://vaadin.com/wiki/-/wiki/Main/JMeter%20Testing and trying to emulate with a single user. With the simplest step of Login and Logout, i encounter this error during playback. No UIProvider returned a UI for the request Any idea what is this error regards or how to troubleshoot it? It looks like that jMeter example is for Vaadin 6. Vaadin 7 refactored the servlet class, and the Application class is now the UI class. So instead of that section of the web.xml looking like this: <servlet> <servlet-name>FeatureBrowser</servlet

get Liferay user information with Vaadin

只愿长相守 提交于 2019-12-06 12:13:15
问题 I need to check in my portlet wich language does an user have selected as his "main" language, to do that, I have to get the UserID (name) first . i have been looking for it for two days (Liferay forums , vaadin forums , stackoverflow etc.) but nothing found that would work so far. I have found an nice example but it doesnt seem to work (It always returns "null"). package com.example.translation_portlet; import javax.portlet.PortletRequest; import javax.portlet.PortletResponse; import com

Vaadin Session Management - How does it work?

落爺英雄遲暮 提交于 2019-12-06 11:33:31
问题 At work, we develop a web application using Vaadin. I am a pretty advanced programmer in Java. I’m experienced with Vaadin as well. But now I've come to a point where information needs to be stored in a user session. Attributes like Locale, Username and so on. In the Vaadin Documentation they are talking about two different types of sessions but I dont really get the difference: VaadinServletService or VaadinPortletService described as low-level customization layer for processing requests.

Getting rid of web.xml in Vaadin 7 with VaadinServlet

会有一股神秘感。 提交于 2019-12-06 11:12:49
问题 I'm new to Java and Vaadin. A basic Vaadin project is using web.xml for all the mappings. If I want to use the @WebServlet annotation I need to create an inner class which somewhere inherits from HttpServlet . @SuppressWarnings("serial") public class VaadinplaygroundUI extends UI { @WebServlet(urlPatterns="/Helo") public static class Servlet extends VaadinServlet { } @Override protected void init(VaadinRequest request) { final VerticalLayout layout = new VerticalLayout(); I know, I'm missing

Tomcat 7 with Vaadin, Hibernate, Eclipse and Maven 3

穿精又带淫゛_ 提交于 2019-12-06 10:40:27
问题 I'm trying to integrate maven in my existing Vaadin project. There is several errors and weird things. First of all I can't understand what I should do to make tomcat instance used by maven is visible in eclipse. I mean that when I run tomcat7:run, Tomcat instance, preconfigured in eclipse, stays stoped. Also I can't understand which Tomcat instance maven uses and why it creates Tomcat configuration files in project folder, because when I'm trying to open application in browser after tomcat7