fix: throw error if requested page or item count exceeds the Flow limit#3798
Conversation
… the connector Correct length check, add isAllRowsVisible check, carry the code to the server side.
|
SonarCloud Quality Gate failed.
|
tomivirkki
left a comment
There was a problem hiding this comment.
LGTM
Should be merged after the Flow vaadin/flow#14630 is merged.
I think this change would already provide value for users, even before the DataProvider issue in Flow is fixed.
| | IllegalAccessException | IllegalArgumentException | ||
| | InvocationTargetException e) { | ||
| if (e.getCause() instanceof IllegalArgumentException) { | ||
| throw (IllegalArgumentException) e.getCause(); |
There was a problem hiding this comment.
Did I read it correctly that this just re-throws IllegalArgumentException? Could it be then excluded from the union of exceptions above?
| if (e.getCause() instanceof IllegalArgumentException) { | ||
| throw (IllegalArgumentException) e.getCause(); | ||
| } | ||
| Assert.fail("Could not call Grid.setRequestedRange"); |
There was a problem hiding this comment.
I guess it would be helpful to know the cause of the failure here. Could we simply not handle these exceptions like here? Does that approach have any negative consequences?
…ter-10-x-pagesize-items
…ter-10-x-pagesize-items
|
SonarCloud Quality Gate failed.
|
…it (#3798) * fix: throw error if requested page or item count exceeds the Flow limit * fix: correct the if clause and check it in the server side instead of the connector Correct length check, add isAllRowsVisible check, carry the code to the server side. * fix: change the exception message * test: add tests for request variations
…it (#3798) * fix: throw error if requested page or item count exceeds the Flow limit * fix: correct the if clause and check it in the server side instead of the connector Correct length check, add isAllRowsVisible check, carry the code to the server side. * fix: change the exception message * test: add tests for request variations
…it (#3798) * fix: throw error if requested page or item count exceeds the Flow limit * fix: correct the if clause and check it in the server side instead of the connector Correct length check, add isAllRowsVisible check, carry the code to the server side. * fix: change the exception message * test: add tests for request variations
…it (#3798) * fix: throw error if requested page or item count exceeds the Flow limit * fix: correct the if clause and check it in the server side instead of the connector Correct length check, add isAllRowsVisible check, carry the code to the server side. * fix: change the exception message * test: add tests for request variations
…it (#3798) (#4171) * fix: throw error if requested page or item count exceeds the Flow limit * fix: correct the if clause and check it in the server side instead of the connector Correct length check, add isAllRowsVisible check, carry the code to the server side. * fix: change the exception message * test: add tests for request variations Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
…it (#3798) (#4172) * fix: throw error if requested page or item count exceeds the Flow limit * fix: correct the if clause and check it in the server side instead of the connector Correct length check, add isAllRowsVisible check, carry the code to the server side. * fix: change the exception message * test: add tests for request variations Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
…it (#3798) (#4173) * fix: throw error if requested page or item count exceeds the Flow limit * fix: correct the if clause and check it in the server side instead of the connector Correct length check, add isAllRowsVisible check, carry the code to the server side. * fix: change the exception message * test: add tests for request variations Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
…it (#3798) (#4174) * fix: throw error if requested page or item count exceeds the Flow limit * fix: correct the if clause and check it in the server side instead of the connector Correct length check, add isAllRowsVisible check, carry the code to the server side. * fix: change the exception message * test: add tests for request variations Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
|
This ticket/PR has been released with Vaadin 24.0.0.alpha5 and is also targeting the upcoming stable 24.0.0 version. |









Description
A recent change in Flow has limited the number of pages in the response to 10. Also, there is an issue to add another constraint to the responses to have a maximum item count of 500. This PR ensures that these constraints are respected in the
Grid. If more pages or items are requested from the, an exception will be thrown.Should be merged after the Flow issue is merged.
Fixes #3708
Type of change
Checklist