vaadin / vaadin/framework

Block or disable UI component waiting for server response

Open
#10,571 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

When you want to block the UI waiting for a server response in Vaadin you have three options:

  1. use a CSS style to show a Modal Curtain: is tricky and disables the entire UI
  2. use Button.setDisableOnClick(): ok, but works only for the button that was clicked
  3. use push to disable the controls: inadequate especially for slow connections

It would be very useful to have a "generalization" of setDisableOnClick() for other event types (Grid row clicks, menu selections, ...) that can block or disable (on the client side) not only the control that generated the event but other controls too, until the server's response.

Two simple uses cases:

  1. you click on the save button of the form: the cancel and the delete buttons should be immediatly disabled until the server executes the save operation and responds to the client.
  2. you click a row in a Grid and execute a command, but many users use double click so they execute the same command two times: the grid should be immediatly disabled to prevent double click.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Button.setDisableOnClick() behavior and the event paths for Grid row clicks and menu selections. Define how client-side disabling should cover other controls and end when the server response arrives, including the save and double-click cases described in the issue. No source file or test is named, so locating those implementations is part of the initial investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.