vaadin

How to create a secure view with Vaadin and SpringViewProvider

别等时光非礼了梦想. 提交于 2020-01-02 07:13:12
问题 There is a tutorial about Vaadin III - Views and Navigation with Vaadin Spring If I want to use Apache Shiro. How should I use ViewAccessControl? @SpringComponent @SpringView(name = SecuredView.VIEW_NAME) public class SecuredView extends VerticalLayout implements View, ViewAccessControl { public static final String VIEW_NAME = "view"; @PostConstruct void init() { addComponent(new Label("This is a secured view scoped view")); } @Override public boolean isAccessGranted(UI ui, String string) {

How to create a secure view with Vaadin and SpringViewProvider

不打扰是莪最后的温柔 提交于 2020-01-02 07:13:04
问题 There is a tutorial about Vaadin III - Views and Navigation with Vaadin Spring If I want to use Apache Shiro. How should I use ViewAccessControl? @SpringComponent @SpringView(name = SecuredView.VIEW_NAME) public class SecuredView extends VerticalLayout implements View, ViewAccessControl { public static final String VIEW_NAME = "view"; @PostConstruct void init() { addComponent(new Label("This is a secured view scoped view")); } @Override public boolean isAccessGranted(UI ui, String string) {

How can I force Vaadin client engine to retry sending requests to the server?

六月ゝ 毕业季﹏ 提交于 2020-01-02 05:24:10
问题 I'm experimenting with the Vaadin Java framework at the moment and I've noticed that the client engine does not retry sending requests to the server. When mobile internet network is weak or inconsistent it would be good to keep retrying sending of requests rather than giving up. Does any one know how to achieve this in Vaadin? 回答1: Extending ApplicationConnection and overriding doAjaxRequest should be enough to achieve what you're trying to do. Something like this: public class

No vertical scroll in browser

泄露秘密 提交于 2020-01-02 04:23:07
问题 I'm developing a Vaadin application and am having extreme difficulty getting some aspects of the layout as I want. The major problem right now is that I can't seem to get a vertical scroll in my layout no matter how big the size of the content is or how small the browser window is.. I have read up on the subject, I know that the hLayout and the vLayout doesn't support scrollbars but the Panel do. I've tried in many different combinations to make it work but I've only managed to get a

How to close a Vaadin subwindow on mouseclick outside of the window?

安稳与你 提交于 2020-01-01 10:56:39
问题 I'm using vaadin 7 and in my application I use subwindows sometimes. In one case I have a modal window with several components in it. It opens another window when clicked on some of the components inside the modal window. I'd like this window to close automatically when the user clicks outside of it (e.g. on the modal window again). In the Vaadin Sampler this behaviour seems implemented when showing the source (click on the source button in the right upper corner). Also the behaviour should

How can I use CSS for Vaadin components?

时光总嘲笑我的痴心妄想 提交于 2020-01-01 10:16:15
问题 I seem to be seeing examples, where people answer to questions how to get some specific behavior from components by adding CSS code, however nobody seems to explain how to use that CSS code to connect it to Java components... .v-table-body{ overflow: hidden !important; } How do I use for instance this code on my table that I create? Table table = new Table(caption); table.addContainerProperty("Visit ID", Long.class, null); 回答1: You can create you own custom theme. See https://vaadin.com/book/

Vaadin Flow app switch between light and dark modes automatically

ⅰ亾dé卋堺 提交于 2020-01-01 06:52:10
问题 Vaadin Flow 14 ships with light and dark versions of its two bundled themes, Lumo and Material . And now browsers can ask the host OS for the user’s preference for light or dark modes. Is there a way to have a Vaadin app automatically use the light or dark theme variant per the user’s wishes? Marcus Hellberg wrote a helpful post on how to switch light/dark mode theme variants programmatically. I am wondering if Vaadin 14 might be able to switch automatically now that the user preference is

Deploy vaadin to JBoss 7.0 gives me a ClassNotFoundException

喜欢而已 提交于 2020-01-01 05:39:16
问题 I've created a new Vaadin (6.6.5) project in eclipse and I've tried to deploy it on JBoss 7.0 but it gives me a GWT ClassNotFoundException Caused by: java.lang.ClassNotFoundException: com.google.gwt.user.client.ui.HasWidgets from [Module "deployment.test.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358) at org.jboss.modules

@PreserveOnRefresh - Purpose and need?

 ̄綄美尐妖づ 提交于 2020-01-01 03:23:49
问题 I have a doubt regarding the purpose of @PreserveOnRefresh annotation. What is the purpose of this particular annotation and what are the scenarios in which it has to be used? What are the effects of using/not using this annotation? Thanks, Daniccan VP 回答1: The other answer is not quite correct as noted in the comments (summarized here). Vaadin 7 This Answer applies to Vaadin 7. Vaadin 6 is different in some ways. Session Is On-going As soon as a user’s browser reaches your Vaadin app, a

Vaadin vs. Bootstrap

一个人想着一个人 提交于 2019-12-31 14:35:44
问题 I am planning to make an application that has views with complex forms and logical validation on the client side. I plan to use AJAX for submits and have some visual appeal. I want a recommendation from those who have experience developing with Bootstrap and/or CoffeeScript and Vaadin. I have two options: Using Bootstrap / CoffeeScript and some framework for the server site, such as Play Framework, Rails or Django Vaadin The criterion that concerns me is related to the complications that may