Comments (4)
There are several solutions and I don't know which one is the best.
- Prevent the postback when another postback is active. The advantage is that this behavior also helps to prevent e.g. creating duplicate items in the DB when the user double clicks the button. In combination with some UpdateProgress control which displays some loading icon, this is my favorite.
- Allow the second postback and when the response comes from the first one, drop it because it is outdated. This is the way ASP.NET WebForms behave.
- Put the postback in some queue and post it to the server when the current postback is finished. I don't think this is suitable for most scenarios however I can imagine this solution for e.g. the Timer control which posts back each minute - in case there is some postback, the Timer will wait until it is finished. But we can implement this behavior directly in the Timer control, it does not have to be the framework feature.
from dotvvm.
Maybe we can queue postbacks internaly but disable all controls performing actions. This will prevent user enqueuing many unwanted requests (and creating duplicates in db) and make posting back in any time possible.
from dotvvm.
If you prevent the user to use the controls during the postback, it is the solution 1 and there is no need for the queue at all.
from dotvvm.
For the milestone 0.5 I have decided that it will be enough to create the UpdateProgress control that can display an overlay with a loading animation.
If the developer decides not to use it, then the user will be able to create multiple postbacks but it is his problem.
from dotvvm.
Related Issues (20)
- GridView (table) with rounded corners? HOT 1
- Dependency cycle HOT 2
- Date/DateTime Textbox value resets if user changes year HOT 1
- Failed to deserialize viewModel encrypted values HOT 3
- Fail fast on issues with viewmodel serialization HOT 1
- Fix style / script parsing
- Change warning to error in next major release
- BP RadioButtonList with Rest API bindnigs does not display selected value after source data load
- Add `Auto UI` README to dotvvm-docs HOT 1
- Possible bug in null propagation visitor on .NET Framework
- Remove setters from IDotvvmRequestContext
- Better auto-discovery of routes and resources
- Hot reload breaks markup controls with @property directive HOT 3
- IncludedInPage with resource binding to _control property doesn't work HOT 1
- Dotvvm CommandLine commands dont work if csproj path contains spaces
- Make it error to use DotvvmView instead of DotvvmMarkupControl
- Add support for priority hints using `fetchpriority` on JS and CSS resources HOT 2
- Add support of css classes and styles to JsComponent HOT 1
- Fix issue with validation exception not being thrown after manually adding errors
- Add custom metadata for IDE extensions and validation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotvvm.