Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:55
    Artur- commented #9785
  • 10:40
    vaadin-bot labeled #9886
  • 10:39
    vaadin-bot commented #9886
  • 10:38
    netbeansuser2019 commented #9563
  • 10:35
    ZheSun88 labeled #9890
  • 10:35
    ZheSun88 labeled #9890
  • 10:35
    ZheSun88 labeled #9890
  • 10:32
    ZheSun88 opened #9890
  • 10:32

    ZheSun88 on add-script-for-flow

    chore:Add script for flow cherr… (compare)

  • 10:26
    miguelatvaadin commented #9887
  • 10:23
    mcollovati commented #9887
  • 10:20
    ZheSun88 opened #9889
  • 10:19
    miguelatvaadin commented #9887
  • 10:19
    ZheSun88 opened #9888
  • 10:16
    miguelatvaadin edited #9885
  • 10:16

    ZheSun88 on cherry-pick-to-2.4-1611742196131

    test: Revert user.dir system pr… (compare)

  • 10:14

    ZheSun88 on cherry-pick-to-2.5-1611742220040

    fix: use time-constant comparis… test: Revert user.dir system pr… feat: implement NativeDetails a… and 1 more (compare)

  • 10:10
    vaadin-bot labeled #9653
  • 10:10
    vaadin-bot labeled #9657
  • 10:10
    vaadin-bot labeled #9694
LuizPhilipWennerstrom
@LuizPhilipWennerstrom
I inherit everything from vaadin's dependence. There is nothing explicit about tomcat in pom.xml. What Am i missing?
my dependencies are
    <dependencies>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
        </dependency>
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
        </dependency>
    </dependencies>
Ghost
@ghost~5940038dd73408ce4f6704d7
what i mean: if in your tomcat is already a class loaded with that name, you might get that instead of the version you provide/want. or maybe some other version wins while you build
first order here is to make sure, the problem is not what you are distributing. check the actual call in your ide, where it works, and make a note of the actual used versions etc. then make sure everything is fine in your war: is the correct version in the war, is it there only once (e.g. springboot packs all the jars in the jar)
if you can be sure, it works on your end, check the tomcat
LuizPhilipWennerstrom
@LuizPhilipWennerstrom
I use jar for packing so its configured with the embedded server
Ghost
@ghost~5940038dd73408ce4f6704d7
so you dont deploy to a tomcat instance but you just run a fat jar from boot which uses tomcat? might still be the class loader seeing the wrong version. i'd check the jars in the jar. also you can try locally and see what is going on - e.g compare running in your ide vs bootRun vs running the fat jar
LuizPhilipWennerstrom
@LuizPhilipWennerstrom
the same jar runs local and from ide. When i try running in a Docker container i get the error !! All jars inside seems to be ok
Sebastian Basner
@areyouready
Is it possible to bind two checkboxes of a checkboxgroup<String> to two different Boolean fields?
Ghost
@ghost~5940038dd73408ce4f6704d7
you can provide getters and setters when binding fields (the HasValue ones)
Sebastian Basner
@areyouready
Yes but only for the group not the individual fields or have I overlooked something?
Ghost
@ghost~5940038dd73408ce4f6704d7
you get from your two properties (i use that instead of the overloaded field) and turn it into a string set for reading and vv
Sebastian Basner
@areyouready
Ok, I guess I know what you mean but my problem starts earlier, I don't know how to assign the individual items instead of the CheckBoxGroup to the binder. e.g.
CheckboxGroup<String> checkboxGroup = new CheckboxGroup<>(); checkboxGroup.setLabel("Label"); checkboxGroup.setItems("Option one", "Option two", "Option three");
now I want to bind "Option one" as a boolean to a bool field in OptionDTO via Binder<OptionDTO> optionBinder.
It would be easy to do optionBinder.forField(checkboxGroup).... but this is not what I want because the group as a whole has no representation in the DTO
Sebastian Basner
@areyouready
I mean it is just convenience I could use the valueChangeListener and set the bool manually but it would be cool if the binder provided this feature and I could save a few lines of code
Ghost
@ghost~5940038dd73408ce4f6704d7
if you dont want to steer that in the binding and you already have a DTO, why not write a setter/getter there to adopt between the bools and the set?
Sebastian Basner
@areyouready
Sometimes you can not see the obvious. Thx thats the solution I searched for
tomasz
@eadviser
HI, all
I have a problem with vaadin 14.4.2 and video element. I'm getting 416 error (range not satisfied) for element delcared by:
new Html("<video id=\"vid01\" class=\"video\" muted autoplay playsinline loop style='position: fixed;object-fit: cover;width: 100%;height: 100%;'><source src=\"video/bg_vid.mp4\" type=\"video/mp4\"></video>");
while with vaadin 14.2.1 all worked well
is anyone here with some advice ?
Alexis LEBEL
@Alestrio
Hi ! I'm trying to make a multiview web app in Vaadin 14 using the guides on VoK site. There's something I don't understand : What is the "getElement(...)" method in Router Layout ?
Thanks,
Ghost
@ghost~5940038dd73408ce4f6704d7
@Alestrio: it's inherited from HasElement and it holds basically the DOM element. the actual backing for this interface is done in the class you are implementing the RouterLayout
Alexis LEBEL
@Alestrio
in the guide, they do not explain what to do with this. Basically, I must return the div named "viewContainer" isn't it ?
Alexis LEBEL
@Alestrio

in the guide, they do not explain what to do with this. Basically, I must return the div named "viewContainer" isn't it ?

So I must return viewContainer.element in my case. Thanks for your help, have a nice day

m-escher
@m-escher
Hey there, is there a way to fetch data from V17 Grid DataProvider without blocking the UI?
18 replies
Ghost
@ghost~5940038dd73408ce4f6704d7
while we are talking DX - is there a usecase for @Route(value="/something") to work and not just choke somewhere when validating the routes?
asking for a RouterLink on a view annotated with such a route will create a link "without" the leading slash; adding a second slash in the url-bar will still not work; with the third slash the error will start to show the third one url-escaped
Rolando Isidoro
@rolandoisidoro

Hey all. I'm getting a weird error upon clicking the Save button on a CRUD editor for an existing record.
I've created a breakpoint and found that Grid.findByKey(Grid.java:2937) is called twice during this process, first when the editor opens and again when it closes.

I have a single record on the Grid. The first call to findByKey has value 1 on the argument, while on save the value is 2, which is non-existent, hence the error.

Any idea what could be generating this problem?

Caused by: java.lang.IllegalStateException: Unknown key: 2
    at com.vaadin.flow.component.grid.Grid.findByKey(Grid.java:2937)
    at com.vaadin.flow.component.grid.Grid.deselect(Grid.java:2931)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.vaadin.flow.server.communication.rpc.PublishedServerEventHandlerRpcHandler.invokeMethod(PublishedServerEventHandlerRpcHandler.java:200)
Marcus Hellberg
@marcushellberg
Hey folks! Good news 🎉 We are moving our community chat to Discord. Please join us over at https://discord.gg/MYFq5RTbBn. We'll be closing down the Gitter chat in a week or so.
Sebastian Basner
@areyouready
Is there a way to deactivate the Stacktrace error page and show a default one to the user no matter what kind of error happened?
Pekka Hyvönen
@pleku
Stacktrace should not be shown to the end user when you're running in production mode. Instead there will be the "Internal Error" red box in the UI
Sebastian Basner
@areyouready
Ahh Ok, thx... good to know
Pekka Hyvönen
@pleku
Or in case the error happens during navigation and you have a suitable error view in place, that one should be shown instead
https://vaadin.com/docs/v14/flow/routing/tutorial-routing-exception-handling.html#advanced-exception-handling-example
Sebastian Basner
@areyouready
Thx again, I will look into that.
Pekka Hyvönen
@pleku

Marcus Hellberg @marcushellberg Nov 09 20:41
Hey folks! Good news 🎉 We are moving our community chat to Discord. Please join us over at https://discord.gg/MYFq5RTbBn. We'll be closing down the Gitter chat in a week or so.

Alright, see y'all in the discord channel for Flow https://discord.com/channels/732335336448852018/774366825756229632 :wave:

Sascha Frinken
@sfrinken_gitlab
Propably not, sorry…
Nils-Florian
@Nils-Florian
Hi, is there any way to change the name of a file when i use the upload component?
kamilaprz
@kamilaprz
Guys, where do I find or how access the UIUtils class mentioned in so many places, for example here? https://github.com/vaadin/docs/blob/193c518ec434adeaa16a11f2e0d2f078a038c1a2/articles/guide/starter/business-app/theming.asciidoc
kamilaprz
@kamilaprz

Hi, again topic of events.
Guys question on the edge between Java and Grid:
I have a complex model that is something like:

Model {
    String name;
    String value;
    String GroupFields someFields;
    String AnotherGroupFields someOtherFields;
    String YetMoreFields yetMoreFields;
}

Now, I also have tabs and when one of them is selected, the columns for given group should be displayed, for example clicking tab Group Fields would expect to show columns name, value + whatever properties are inside someFields. What is the best approach without specifying column per property of all nested object?
How do I squeeze such model into Grid?

1 reply
matrixbot
@matrixbot
mijutu I tried Vaadin 18.0.1 from start.vaadin.com. "mvn package -Pproduction" created a .jar instead a .war in target directory. What do I need to change to get a .war?
Srdjan Tijanic
@stijanic

mijutu I tried Vaadin 18.0.1 from start.vaadin.com. "mvn package -Pproduction" created a .jar instead a .war in target directory. What do I need to change to get a .war?

<packaging>war</packaging> in pom.xml?

matrixbot
@matrixbot
mijutu That was it. But how come that is not the default with the "Java only" choice?
matrixbot
@matrixbot
mijutu Why doesn't AbstractStringToNumberConverter.convertToPresentation return "" when value equals the emptyValue field?
matrixbot
@matrixbot
mijutu In my case I needed null value to be presented as empty string, so I tried .withConverter(new StringToLongConverter(null, "")). This causes an error, because null value isn't converted to empty string, but is forwarded to TextField.
mijutu I got around the problem by addin another converter: .withConverter(s -> ("".equals(s) ? null : s), s -> s == null ? "" : s).withConverter(new StringToLongConverter(null, "")
John1997x
@John1997x
Hi guys! I've just started a new project using maven archetype but I'm not getting live reloads.. anyone with the same issue? Thanks in advance for your help.
Paweł
@paveldabrowski

I have somethink like this in Vaadin. I don't know how to find the issue source. Please help.
{2021-01-18 02:59:26.174 ERROR 19132 --- [nio-8080-exec-3] c.v.flow.router.InternalServerError : There was an exception while trying to navigate to ''

java.lang.IllegalStateException: Can't move a node from one state tree to another. If this is intentional, first remove the node from its current state tree by calling removeFromTree}