Skip to content

Commit 44acd83

Browse files
authored
Merge branch 'latest' into docs/848/control-center-troubleshooting
2 parents 014298d + b75e26d commit 44acd83

File tree

18 files changed

+178
-19
lines changed

18 files changed

+178
-19
lines changed

articles/_vaadin-version.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:vaadin-version: 24.7.0
1+
:vaadin-version: 24.7.1
22
:vaadin-flow-version: 24.7.0
33
:vaadin-seven-version: 7.7.38
44
:vaadin-eight-version: 8.20.0

articles/building-apps/views/add-view/flow.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ com.example.application
186186
└── CUstomerDetailsView.java
187187
----
188188
<1> The example feature is "customer relationship management".
189-
<2> All the views are in the same `view.ui` package.
189+
<2> All the views are in the same `ui.view` package.
190190

191191
If the view consists of more than one class, consider creating a separate package for it, like this:
192192

@@ -203,7 +203,7 @@ com.example.application
203203
└── CustomerDetailsView.java
204204
----
205205
<1> The onboarding view consists of multiple classes and has its own package.
206-
<2> The other views remain in the `view.ui` package.
206+
<2> The other views remain in the `ui.view` package.
207207

208208
If you don't know whether your new view is going to be small or large, start by putting it in the `ui.view` package. You can always refactor it into its own package later.
209209

@@ -330,4 +330,4 @@ Now you've explored how to define and organize Flow views in a Vaadin applicatio
330330
* Work with multi-segment routes to create more readable and meaningful URLs.
331331
332332
Next, see the <<../navigate#,Navigate to a View>> guide to learn how to navigate from one view to another.
333-
====
333+
====

articles/components/card/index.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ include::{root}/frontend/demo/component/card/react/card-header.tsx[render,tags=s
186186
endif::[]
187187
--
188188

189+
You should add the title before the subtitle in the DOM order to make it the first announced element for screen reader users. You can use flexbox and the `order` CSS property to visually place the subtitle before the title without affecting the DOM order.
189190

190191
=== Header Prefix
191192

articles/contributing/docs/types.adoc

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Types of Documentation
3+
page-title: Types of Documentation | How to contribute to Vaadin Documentation
4+
description: Learn about the different types of Vaadin documentation - how-to guides, reference manuals, and deep dives - and understand best practices for writing each type effectively.
5+
meta-description: Learn about the different types of Vaadin documentation - how-to guides, reference manuals, and deep dives - and understand best practices for writing each type effectively.
6+
order: 5
7+
---
8+
9+
= Types of Documentation
10+
11+
In the Vaadin documentation, you'll find different types of guides and articles. Each serves a distinct purpose, so it's important to avoid mixing different types of content in the same guide to maintain clarity and usability.
12+
13+
14+
== How-to Guides
15+
16+
A how-to guide helps the reader *perform a specific task* by offering practical, step-by-step instructions.
17+
18+
When writing a how-to guide:
19+
20+
* *Choose the best approach*: While multiple solutions may exist for a given task, present the one that works best in most scenarios. How-to guides should represent current best practices.
21+
* *Include just enough theory*: Provide sufficient background information for readers to understand the context, but reserve deeper explanations for deep dives or reference manuals.
22+
* *Ensure production readiness*: All instructions must be applicable in production environments. If you need to use mocks to keep the article focused, clearly identify these sections and provide resources explaining how to implement real-world solutions.
23+
* *Maintain appropriate scope*: If a guide becomes too lengthy, split it into smaller, interconnected guides with clear links between them.
24+
* *Add practical examples*: When possible, include a mini-tutorial at the end that applies the concepts to a <<{articles}/getting-started/start#,Walking Skeleton>> application. These tutorials can span multiple guides, with each building upon the previous one.
25+
26+
Most how-to guides belong in the <<{articles}/building-apps#,Building Apps>> section, but you can place them elsewhere if more appropriate.
27+
28+
[IMPORTANT]
29+
A new user should be able to become productive with Vaadin by reading the how-to guides alone, without needing to consult other documentation types.
30+
31+
32+
== Reference Manuals
33+
34+
A reference manual provides factual explanations of *what features a product has* and *how they work*. How-to guides often build upon reference manuals and refer to them for detailed information.
35+
36+
When writing a reference manual:
37+
38+
* *Maintain neutrality*: Be less opinionated than in how-to guides. Avoid comparing features unless highlighting a deprecated feature and its replacement.
39+
* *Balance technical depth*: Include as much technical detail as benefits the reader, but consider moving design motivations and reasoning to deep dive articles or blog posts.
40+
* *Focus on completeness*: Ensure all product features are documented thoroughly and accurately.
41+
42+
Every Vaadin product has its own dedicated reference manual.
43+
44+
[IMPORTANT]
45+
When updating a reference manual, always review related how-to guides to ensure consistency across documentation.
46+
47+
48+
== Deep Dives
49+
50+
Deep dives offer more abstract and comprehensive content than how-to guides and reference manuals. They are the *most opinionated* yet *least prescriptive* type of documentation.
51+
52+
Deep dives can:
53+
54+
* Explore reasoning behind design decisions or best practices
55+
* Offer insights, opinions, and alternative approaches
56+
* Provide architectural guidance and design philosophy
57+
* Discuss trade-offs and considerations when making complex decisions
58+
59+
Consider deep dives as thought-provoking content rather than explicit instructions. They should enhance understanding but shouldn't be required reading for getting started with Vaadin.
60+
61+
Deep dives need not directly relate to Vaadin products, but should align with Vaadin's mission of making Java-based application development and modernization faster and easier.
62+
63+
Most deep dives appear in the <<{articles}/building-apps/deep-dives#,Building Apps>> section, but product-specific deep dives can be placed within their respective product documentation.

articles/control-center/application-deployment/index.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ To deploy the application to a Kubernetes cluster, you'll need to create a Docke
4646

4747
[source,docker]
4848
----
49-
FROM eclipse-temurin:17-jre
49+
FROM eclipse-temurin:21-jre
5050
COPY target/*.jar app.jar
5151
EXPOSE 8080
5252
ENTRYPOINT ["java", "-jar", "/app.jar"]

articles/control-center/identity-management/index.adoc

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ meta-description: Learn how to configure identity management in Vaadin Control C
66
order: 30
77
---
88

9-
109
= Identity Management
1110

1211
Control Center provides powerful tools to manage users, groups, roles, and identity providers for Vaadin applications deployed in a Kubernetes cluster. These features are essential for controlling access to various parts of an application and providing secure authentication and authorization for users.
@@ -43,14 +42,17 @@ Once you're in the user creation form, fill in the required fields:
4342
- *First Name* & **Last Name**: The user's display name.
4443
- *Email Address*: This is used for the user's login.
4544
- *Password*: Set an initial password for the user. You can also enable the [guilabel]*Request password change* option to force the user to change this password at the next login.
46-
- *Multi-Factor Authentication*: Enable MFA to require the user to verify their identity with an additional factor, such as an authenticator application.
47-
- *Password-less authentication*: Allow the user to authenticate using a passkey instead of their password. When enabled, the user must register a passkey on their next login.
45+
- [.commercial]*Multi-Factor Authentication*: Enable MFA to require the user to verify their identity with an additional factor, such as an authenticator application.
46+
- [.commercial]*Password-less authentication*: Allow the user to authenticate using a passkey instead of their password. When enabled, the user must register a passkey on their next login.
4847

4948
Once all of the information has been entered, click [guibutton]*Create* to finalize the process. The new user account should appear in the list of users for the application.
5049

5150

5251
== Alternative Authentication Methods
5352

53+
:commercial-feature: MFA & Password-less authentication
54+
include::{articles}/_commercial-banner.adoc[opts=optional]
55+
5456
Control Center offers a couple of alternatives to password-only authentication for deployed applications.
5557
These alternative authentication methods can be enabled on a per user basis.
5658
Applications deployed with Control Center can enable two-factor authentication using One-Time Passcode.
@@ -60,6 +62,7 @@ Password-less authentication is available through the use of Passkeys.
6062
image::images/authentication-selector.png[Authentication Selector]
6163

6264

65+
[.commercial]
6366
=== One-Time Passcode
6467

6568
One-Time Passcodes can only be used as a second factor of authentication, and not on their own as single factor of authentication.
@@ -72,6 +75,7 @@ If OTP is then disabled and re-enabled for a user, they will have to register th
7275
image::images/otp-config.png[OTP Configuration]
7376

7477

78+
[.commercial]
7579
=== Authenticating with Passkeys
7680

7781
Each user of any deployed application in Control Center can have an alternative authentication method that lets them authenticate using a passkey instead of a password.
@@ -136,6 +140,9 @@ After creating an identity provider, you can find it in the *Identity Providers*
136140
[.device]
137141
image::images/provider-detail.png[Identity Provider Detail Form]
138142

143+
[.commercial]
144+
=== Custom Identity Provider
145+
139146
When you want to create a custom OpenID Connect 1.0 provider, you'll also need to specify the `Discovery Endpoint`. This is used during the provider creation to get relevant metadata from the external provider. The endpoint URL has a specific format: It always ends with the `.well-known/openid-configuration` path. (e.g., `https://1234-admin.okta.com/.well-known/openid-configuration`). Usually, you can find the discovery endpoint in the client details after you create it with the external provider. As an example, creating an Okta provider looks like this:
140147

141148
[.device]

articles/control-center/index.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Key capabilities include the following:
3535
- *Authentication Enforcement*: Configure your applications to require user authentication seamlessly, enhancing security.
3636
- *Intuitive Management Interface*: Use Control Center's user-friendly UI to create and manage users, groups, and roles, efficiently.
3737
- *External Identity Provider Integration*: Connect to external identity providers, such as social accounts (e.g., Google, Facebook) or other OpenID Connect providers, offering flexible authentication options to your users.
38-
- *Multi-Factor Authentication*: Increase security by enabling MFA, allowing users to authenticate using an authenticator application for an additional layer of protection.
38+
- [.commercial]*Multi-Factor Authentication*: Increase security by enabling MFA, allowing users to authenticate using an authenticator application for an additional layer of protection.
39+
- [.commercial]*Password-less Authentication*: Effortless login with passkeys, allowing users to authenticate without having to remember a password or running the risk of using an insecure or repeated password.
3940

4041
Implementing MFA can significantly reduce the risk of unauthorized access, safeguarding sensitive data within your applications.
4142

articles/flow/advanced/server-client-communication.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The `syncId` is always incremented by 1 after a new UIDL response is generated.
2727

2828
=== clientId
2929

30-
The `clientId` holds the latest communication state identifier given by the client. The client token is incremented on the client after sending the message. The server increments the value in the response to match the next expected `clientId` (i.e., client updated after message sent).
30+
The `clientId` holds the latest communication state identifier given by the client. The client token is incremented on the client after sending the message, but only if the client has already received a response from the server to the previously sent message. Until this response has been received, the client attempts to resend the message until some kind of response is received, and the messages generated during that time are placed in a queue to wait. Once the server has received the message from the client, it increments the token value in the response to match the next expected `clientId` (i.e., client updated after message sent).
3131

3232
On the client, pending messages are removed from the queue as handled when `clientId` from server matches the next expected value. If the id is less than expected, the client waits since the server has not yet seen all messages. The response should arrive later. Otherwise, the client trusts the server and updates the id to the server's expectations.
3333

articles/flow/configuration/live-reload/index.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ In general, JRebel and HotswapAgent are faster as they only patch one class in m
4545

4646
The user session is also handled differently: as JRebel and HotswapAgent do not restart the server, the user session is preserved. With Spring Developer Tools, you lose the user session unless you ensure all parts are serializable and you turn on session serialization for development mode (see <<{articles}/flow/configuration/properties#,Configuration Properties>>).
4747

48+
When Vaadin is notified about a class change that affects a view currently displayed in the browser, it determines the best strategy to refresh the contents; in most cases the page is refreshed without a full page reload. However, if needed, Vaadin can be forced to always trigger a full page reload by setting the `vaadin.hotswap.forcePageReload` system property (`-Dvaadin.hotswap.forcePageReload=true`).
4849

4950
== Automatic Server Restart
5051

articles/flow/configuration/maven.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ Clears the generated frontend files after building a project for production. It
119119
`frontendExtraFileExtensions`::
120120
Parameter for adding file extensions to a handle when generating bundles.
121121

122+
`frontendIgnoreVersionChecks`::
123+
Makes Flow skip node and npm/pnpm/bun version checks during bundle build and development server startup. Note that disabling frontend tools version checking can cause failing builds and other issues that are difficult to debug.
124+
122125

123126
=== Build Frontend Goal Parameters
124127

articles/flow/configuration/properties.adoc

+14
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,14 @@ Bundle parameter controls parts of frontend bundle creation.
225225
|`false`
226226
|Development
227227

228+
|`frontend.hotdeploy.dependencies`
229+
|`vaadin.frontend.hotdeploy.dependencies`
230+
|A comma-separated list of module directories to watch for frontend file changes when detecting hot-deployable resources. Entries need to point to directories relative to the module that starts the Vaadin application, and can point to the module itself as well, in case it provides frontend files as resources. The value could be for example "./,./component-module-1,./component-module-2". Flow will watch for changes in both `src/main/resources/META-INF/resources/frontend` and the legacy `src/main/resources/META-INF/frontend` directories under the given three directory entries.
231+
232+
Do note that if this parameter is not defined, Vaadin wathes for changes under `src/main/resources/META-INF/` in the module that starts the Vaadin application, but when you provide a custom value for the parameter you need to add "./" to the list of directories to watch for the same effect.
233+
|``
234+
|Development
235+
228236
|`heartbeatInterval`
229237
|`vaadin.heartbeatInterval`
230238
|Sets the heartbeat interval time. UIs that are open on the client-side send a regular heartbeat to the server indicating that they're still active even without ongoing user interaction. When the server doesn't receive a valid heartbeat from a given UI within a certain amount of time, it removes that UI from the session. The interval value is expressed in `seconds`. See also `closeIdleSessions`.
@@ -401,6 +409,12 @@ The following table contains the properties that are used only by the Vaadin Mav
401409
|`null`
402410
|Build
403411

412+
|`frontendIgnoreVersionChecks`
413+
|`vaadin.ignoreVersionChecks`
414+
|Makes Flow skip node and npm/pnpm/bun version checks during bundle build and development server startup. Note that disabling frontend tools version checking can cause failing builds and other issues that are difficult to debug.
415+
|
416+
|Development, Bundle
417+
404418
|`javaSourceFolder`
405419
|
406420
|Source folder used for component scanning during development mode.

articles/flow/routing/layout.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ order: 40
88

99

1010
= Router Layouts & Nested Router Targets
11+
:toclevels: 2
1112

1213
All parent layouts of a navigation target component have to implement the [interfacename]`RouterLayout` interface. You can define a parent layout by adding the [annotationname]`@Layout` annotation to the class, or by using the optional element `layout` from the `@Route` annotation.
1314

14-
[interfacename]`RouterLayout` interface appends and removes child route content during navigation. For more in depth information, see <<#Router Layout,Router Layout>>.
15+
[interfacename]`RouterLayout` interface appends and removes child route content during navigation. For more in depth information, see the <<#router-layout,Router Layout>> section below.
1516

1617

1718
[role="since:com.vaadin:[email protected]"]

articles/flow/security/enabling-security.adoc

+44
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,50 @@ For more information about navigation access control consult the <<{articles}/fl
517517

518518
Vaadin strongly recommends not to mix Spring's URL-pattern-based HTTP security and this view-based access control mechanism targeting the same views. Doing so might cause unwanted access configurations, and would be an unnecessary complication in the authorization of views.
519519

520+
== Spring Concurrency Support with Vaadin
521+
522+
Spring Security provides built-in https://docs.spring.io/spring-security/reference/servlet/integrations/concurrency.html[concurrency support] to propagate security contexts across asynchronous operations. One of the key components for this is [classname]`DelegatingSecurityContextExecutor`, which wraps an [classname]`Executor` and ensures that the [classname]`SecurityContext` is properly propagated to background tasks.
523+
524+
In a Vaadin application, [classname]`VaadinSecurityContextHolderStrategy` should be initialized before any custom [classname]`DelegatingSecurityContextExecutor` bean is created. This ensures that the correct security context holder is used, preventing potential issues with authentication propagation in async tasks.
525+
526+
To guarantee that [classname]`VaadinSecurityContextHolderStrategy` is set before the [classname]`DelegatingSecurityContextExecutor` bean is instantiated, consider the following approaches:
527+
528+
* add `@DependsOn("VaadinSecurityContextHolderStrategy")` to the custom [classname]`DelegatingSecurityContextExecutor` bean definition to explicitly enforce the initialization order
529+
* instead of relying on implicit ordering, have [classname]`VaadinSecurityContextHolderStrategy` directly injected into the bean method definition and manually wire it into the [classname]`DelegatingSecurityContextExecutor` instance.
530+
531+
532+
[source,java]
533+
.Using @DependsOn
534+
----
535+
@Bean
536+
@DependsOn("VaadinSecurityContextHolderStrategy")
537+
public DelegatingSecurityContextAsyncTaskExecutor taskExecutor() {
538+
var delegate = new ThreadPoolTaskExecutor();
539+
//configure the executor
540+
delegate.initialize();
541+
542+
return new DelegatingSecurityContextAsyncTaskExecutor(delegate);
543+
}
544+
----
545+
546+
[source,java]
547+
.Injecting VaadinSecurityContextHolderStrategy Manually
548+
----
549+
@Bean
550+
public DelegatingSecurityContextAsyncTaskExecutor taskExecutor(
551+
VaadinAwareSecurityContextHolderStrategy strategy) {
552+
var delegate = new ThreadPoolTaskExecutor();
553+
//configure the executor
554+
delegate.initialize();
555+
556+
var executor = new DelegatingSecurityContextAsyncTaskExecutor(delegate);
557+
executor.setSecurityContextHolderStrategy(strategy);
558+
return executor;
559+
}
560+
----
561+
562+
By applying either of these solutions, you ensure that the correct security context holder is used for asynchronous task execution in a Vaadin application.
563+
520564

521565
== Spring Impersonation with Vaadin
522566

0 commit comments

Comments
 (0)