Address Book demo issues

First of all let me say Vaadin looks great.

But after running the Address Book demo locally I’ve got some questions/concerns.

  1. Enter key
    Submitting the PersonForm by hitting the enter key is not possible. It should not be a surprise that HTML supports something called a submit button. Why not use it? It should not be necessary to wire it up with something like:
    = new ShortcutAction(“Default key”,51 ShortcutAction.KeyCode.ENTER, null); (taken from another forum post)

  2. Session expiry
    I understand vaadin is using httpSession, but the framework should then include some pinging mechanism to keep the session alive.

  3. Update object
    After editing a persons details using the form, it is not reflected in the table above. Should the framework not update that row automatically? I understand it is just a simple demo, so hopefully that is why it is not working.

Anyone ready to comment on that?

As you said, the desired effect can be achieved with actions. What comes to the enter key submitting the form by default, I have to disagree on that point. I try not to think of Vaadin applications as web applications as such, I don’t want to compare them to traditional stateless applications. I try to think of Vaadin applications more like desktop applications, they just happen to run inside the browser. If you think of it, there are many other features that do not go hand in hand with the traditional web applications, for example, right-click actions and drag and drop.

Secondly, even HTML forms are not always sent when the enter key is pressed. The enter key is actually just a shortcut to an input element with the type “submit”. If you don’t have a submit field, but use plain buttons instead, then the enter key press won’t submit the form (granted, this is not that common of a feature).

Shortcuts are surprisingly often only used by advanced users, the average user (of course, depending on the target audience) often only use visible UI elements, so for example, to submit a form, a user clicks on the submit button. I’ve actually had a client who asked me to disable the enter-shortcut for form sending, because they kept accidentally sending the forms.

I suggest you read the forum thread about the

If that actually happens, then it’s a bug. I tried it, but I was not able reproduce the problem. All my changes were immediately reflected to the table after clicking on save. Are you still experiencing the same problem?

Thanks Kim for your elaborate answer, much appreciated.

  1. I guess we just have different views on this. But I find a bit strange that we should not think of it as web applications, when the Vaadin definition on the homepage says “Vaadin is a Java framework for building modern web applications…” Well, I say make me happy and output my Java code as one without changing the default behaviour of XHTML.

  2. Thanks for the thread link, I’ll be sure to try it out

  3. I’ll have to try again later. I am running Linux, but that really should matter.

Just as a note, I was only expressing my personal opinion, I’m sure that many will agree with you. I know that some people think that right-click actions should be discouraged in Vaadin applications, as it is not a natural action to perform within the browser. This is again something that I do not agree with, but that’s just my opinion :slight_smile: