标签: vaadin

如何在 vaadin 标签上添加 html 格式?

我想在 vaadin 标签上添加 html 格式的字符串。该字符串来自数据库并直接进入标签,它必须使用粗体文本、换行符和其他一些花哨的文本进行格式化。我找到了几个解决方案,但这些解决方案适用于旧版本的 vaadin,有没有办法在 vaadin 流上执行此操作?

html string text label vaadin

0
推荐指数
1
解决办法
1722
查看次数

如何增加 Vaadin 中的最大文件上传数 - Spring Boot

我正在尝试在 Vaadin 14.4.2 中上传文件

        MemoryBuffer loadWeightsBuffer = new MemoryBuffer();
        Upload loadWeightsButton = new Upload(loadWeightsBuffer);
        loadWeightsButton.setMaxFiles(1);
        loadWeightsButton.setDropLabel(new Label("Load weights"));
        loadWeightsButton.setMaxFileSize(500000000);
        loadWeightsButton.addFileRejectedListener(event -> {
            writeToTerminal(event.getErrorMessage());
        });
        loadWeightsButton.addSucceededListener(event -> {
            saveFile(event.getMIMEType(), event.getFileName(), loadWeightsBuffer, WEIGHTS);
        });
Run Code Online (Sandbox Code Playgroud)

但是当我上传大文件时出现此错误。

org.apache.tomcat.util.http.fileupload.impl.SizeLimitExceededException: the request was rejected because its size (44948839) exceeds the configured maximum (10485760)
Run Code Online (Sandbox Code Playgroud)

我尝试添加这个但application.properties没有成功。如何增加 Vaadin 中的上传大小?

spring.http.multipart.max-file-size=500MB
spring.http.multipart.max-request-size=500MB
Run Code Online (Sandbox Code Playgroud)

tomcat vaadin spring-boot vaadin14

0
推荐指数
1
解决办法
612
查看次数

0
推荐指数
1
解决办法
62
查看次数

如何将 javascript 文件包含到 Vaadin 14 litlement 组件中

如何将 JavaScript 库文件包含到 Vaadin 14 中的 LitElement 模板组件中?我想加载一个文件并在组件附加到组件层次结构时自动执行它。

vaadin

0
推荐指数
1
解决办法
299
查看次数

如果更改项目文本,则 RadioButtonGroups 不可点击

我对 Vaadin 和 Java 还很陌生,所以显而易见的技巧也可能是有益的。

在我看来,我有 5 个 RadioGroupButtons(Vaadin 的标准)。主要 RGB 更改其他四个 RGB 的项目文本。一个真实的例子是选择一个汽车品牌(大众、宝马、起亚),每个品牌都有不同的型号。

我尝试在 MainView、RBG 和 RBG_Aggregat 中使用 ClickListener。还尝试将不同的 RBG 作为变量传递给不同的类。没有任何效果。关于这些 RadioButtonGroup 的文档并不多。现在我找到了一些“活页夹”的例子,但我无法让它工作。

任何人都可以引导我朝着正确的方向前进吗?

谢谢!!

主视图的代码如下:我在问题所在的地方添加了注释。

@Route("test")
@PageTitle("test")

public class TestView extends VerticalLayout {
    HorizontalLayout hl =new HorizontalLayout();
    Gefährdungsbeurteilung gefährdungsbeurteilung=new Gefährdungsbeurteilung(1,"","","","","");
    RBG MG = new RBG("Mengengruppe");
    RBG WD = new RBG("Wirkungsdauer");
    RBG WF = new RBG("Wirkfläche");
    RBG FG = new RBG("Freisetzungsgruppe");
    RBG_Aggregat RBGAggregat= new RBG_Aggregat();//Main steering RBG

    public TestView(){
        hl.add(RBGAggregat.returnButton(),MG.returnButton(),WD.returnButton(),WF.returnButton(),FG.returnButton());
        add(hl);
    }

    public class RBG_Aggregat {
        public String selectedItem; …
Run Code Online (Sandbox Code Playgroud)

java radio-group radio-button vaadin

0
推荐指数
1
解决办法
55
查看次数

mvn azure-webapp:deploy 后 Azure Web App 未更新

我正在使用 Azure 托管我的 Java Spring Boot 应用程序。我创建了一个试验来测试此解决方案,并按照本教程使用 Azure 部署(使用azure-webapp-maven-plugin和 命令)成功部署了我的应用程序mvn azure-webapp:deploy

我的问题是,当我在应用程序内进行更改并且我想将它们应用到我的 Azure Web App 中时,但当我到达该页面时实际上没有任何更新,这是使用部署命令后的消息:

[INFO] Updating target Web App...
[INFO] Successfully updated Web App.
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to PATH\custom-dashboard\target\azure-webapp\custom-dashboard-98d69249-24aa-4729-8b7d-b7ff4b419823
[INFO] Trying to deploy artifact to custom-dashboard...
[INFO] Deploying the war file custom-dashboard.war...
[INFO] Successfully deployed the artifact to URL
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  39.637 s
[INFO] Finished …
Run Code Online (Sandbox Code Playgroud)

java azure vaadin maven

0
推荐指数
1
解决办法
1420
查看次数

Vaadin Java Spring Boot - 错误:找到 WebSecurityConfigurerAdapter 以及 SecurityFilterChain。请仅选择一项

我正在使用 Java Spring Boot 和 Vaadin 框架在 Tomcat 上部署 Web 应用程序。我正在使用 Spring Security 与 Okta 进行通信,但在部署战争时遇到问题。

这是我的 pom.xml :

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.test.dashboard</groupId>
    <artifactId>test-custom-dashboard</artifactId>
    <name>Custom dashboard</name>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <properties>
        <java.version>8</java.version>
        <vaadin.version>14.5.3</vaadin.version>
    </properties>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.5</version>
    </parent>

    <repositories>
        <!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
        <!-- Main Maven repository -->
        <repository>
            <id>central</id>
            <url>https://repo.maven.apache.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <!-- Repository used by many …
Run Code Online (Sandbox Code Playgroud)

java spring-security vaadin spring-boot okta

0
推荐指数
1
解决办法
3235
查看次数

Vaadin 14 vs Vaadin 20 用于全新项目

我是 Java 后端工程师,想开始这个全新的项目。不幸的是,对我来说使用 UI 是某种噩梦 :) 这就是为什么我正在寻找一些框架,它可以将我从低级 JavaScript 细节中抽象出来,现在看起来最好的选择是 Vaadin Flow(纯 Java)。

现在,我正在尝试选择 - Vaadin 的正确版本是什么来启动项目 - Vaadin 14 还是最近发布的 Vaadin 20?请指教。现在是开始使用 Vaadin 20 的合适时机吗?

vaadin vaadin-flow vaadin14 vaadin20

0
推荐指数
1
解决办法
69
查看次数

哪个 vaadin 版本将得到长期支持?

我们有一个用 vaadin 6 编写的已有 5 年历史的应用程序。它只使用基本的 vaadin UI 框架功能。如果我们想升级到受支持的较新的 vaadin 版本,我们应该升级到什么版本?我知道从 v6 迁移到 v7 及更高版本需要一些返工。vaadin 8 是完成此 UI 迁移的最佳版本吗?vaadin 8 的支持时间有多长?vaadin 8 之后的 UI 框架是否稳定,即升级到更高版本不需要更改应用程序?感谢您的一些指导。

vaadin vaadin8 eos

0
推荐指数
1
解决办法
326
查看次数