Skip to content

Commit f1a25c0

Browse files
Merge branch 'main' into element-composite-clean
2 parents e1d8d3f + e623bd1 commit f1a25c0

File tree

312 files changed

+17506
-3656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+17506
-3656
lines changed

.dockerignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Git files
2+
.git
3+
.gitignore
4+
5+
# IDE files
6+
.idea
7+
.vscode
8+
*.iml
9+
*.ipr
10+
*.iws
11+
12+
# Build output
13+
target/
14+
build/
15+
dist/
16+
out/
17+
18+
# Test results
19+
test-results/
20+
playwright-report/
21+
test-output/
22+
23+
# Node modules (will be installed fresh in container)
24+
node_modules/
25+
docs/node_modules/
26+
docs/.docusaurus/
27+
docs/build/
28+
29+
# Logs
30+
*.log
31+
logs/
32+
33+
# OS files
34+
.DS_Store
35+
Thumbs.db
36+
37+
# Temporary files
38+
*.tmp
39+
*.temp
40+
*.swp
41+
*~
42+
43+
# Documentation
44+
*.md
45+
!README.md
46+
47+
# Docker files (avoid recursive copies)
48+
Dockerfile
49+
.dockerignore
50+
docker-compose*.yml

.github/.styles/config/vocabularies/webforj/accept.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@ CRUD
3939
MCP
4040
SSE
4141
FAQ
42+
Webswing
43+
SWT
44+
CORS
45+
admin
46+
Swing
47+
MVC

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# the repo. Unless a later match takes precedence,
33
# They will be requested for
44
# review when someone opens a pull request.
5-
* @hyyan @MatthewHawkins @nmlynx @mschned @bbrennanbasis
5+
* @hyyan @MatthewHawkins @nmlynx @mschned @bbrennanbasis @gosteenBASIS
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Java Playwright Tests
2+
3+
on:
4+
push:
5+
branches: [ playwright-test ]
6+
pull_request:
7+
branches: [ playwright-test ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
name: 'Playwright Tests'
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 120
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: '17'
24+
distribution: 'temurin'
25+
cache: maven
26+
java-package: jdk
27+
28+
- name: Cache Maven packages
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/.m2
32+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
33+
restore-keys: ${{ runner.os }}-m2
34+
35+
- name: Install project dependencies
36+
run: mvn clean install -DskipTests
37+
38+
- name: Install Playwright browsers
39+
run: mvn exec:java -e -Dexec.mainClass="com.microsoft.playwright.CLI" -Dexec.args="install --with-deps" -Dexec.classpathScope=test
40+
41+
- name: Run tests
42+
run: mvn verify
43+
env:
44+
CI: true
45+
46+
- name: Upload HTML report
47+
uses: actions/upload-artifact@v4
48+
if: failure()
49+
with:
50+
name: playwright-test-results
51+
path: test-results/reports/
52+
retention-days: 14

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ hs_err_pid*
3232
.settings/org.eclipse.m2e.core.prefs
3333
.theia/settings.json
3434
generated_urls.md
35+
36+
/test-results

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Use Playwright's official Java image
2+
FROM mcr.microsoft.com/playwright/java:v1.50.0-noble
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Copy everything from the host project into that folder
8+
COPY . /app
9+
10+
# Set environment variable (from workflow)
11+
ENV CI=true
12+
13+
# Configure Maven to use custom directory for repository
14+
ENV MAVEN_CONFIG=/var/maven/.m2
15+
RUN mkdir -p /var/maven/.m2
16+
17+
# Default command to run tests
18+
CMD ["mvn", "verify"]

docs/blog/2025-07-15-webforj-v25.02/25.02.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The first exciting change in `25.02` introduces Spring Boot integration, bringin
2828
For enterprise teams with existing Spring Boot infrastructure, this release provides a path to modernize UI layers while maintaining current backend systems and development patterns.
2929

3030
:::info
31-
You can go to the [Spring Framework](/docs/integrations/spring/overview) atricles for more in-depth information about Spring Boot integration.
31+
You can go to the [Spring](/docs/integrations/spring/overview) articles for more in-depth information about Spring Boot integration.
3232
:::
3333

3434
#### Key features

docs/blog/2025-07-29-webforj-crud-spring/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ I'm happy to say, everything was straightforward - I managed to (fairly easily)
4040

4141
### The Back End
4242

43-
Creating my data layer took exactly three files. I've written CSS files longer than my entire backend. Of course, this is a simple app, but with the help of my AI buddy, I was able to not only get these files created, but finally understand the relationship between my [data model/entity](https://spring.io/guides/gs/accessing-data-jpa) defines the structure of my data and maps it to the database, my repository provides an interface for CRUD operations and database queries, and my service layer contains business logic and orchestrates communication between controllers and repositories.
43+
Creating my data layer took exactly three files. I've written CSS files longer than my entire backend. Of course, this is a simple app, but with the help of my AI buddy, I was able to not only get these files created, but finally understand the relationship between the different layers and components. My [data model/entity](https://spring.io/guides/gs/accessing-data-jpa) defines the structure of my data and maps it to the database, my repository provides an interface for CRUD operations and database queries, and my service layer contains business logic and orchestrates communication between controllers and repositories.
4444

4545
**File #1 - The Entity**:
4646

@@ -155,7 +155,7 @@ public class ArtistAvatarRenderer extends Renderer<MusicArtist> {
155155
}
156156
```
157157

158-
My `Table` went from "database dump" to looking like it with built with more intention quite easily. I've spent way too much time with Table renderers, and have been quite enjoying building some cool looking things with them, like this [dashboard project](https://docs.webforj.com/dashboard/) I completed a little while ago.
158+
My `Table` went from "database dump" to looking like it was built with more intention quite easily. I've spent way too much time with Table renderers, and have been quite enjoying building some cool-looking things with them, like this [dashboard project](https://docs.webforj.com/dashboard/) I completed a little while ago.
159159

160160
### Binding the back end to my form
161161

docs/blog/2025-08-07-using-textfield-in-forms/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ textField.setHelperText("Include any suffixes (Jr., II, etc.)");
3434
```
3535

3636
:::tip
37-
Regardless of where you’re information is, avoid using all uppercase text. This can be harder to read for smaller text, especially if multiple fields are present.
37+
Regardless of where your information is, avoid using all uppercase text. This can be harder to read for smaller text, especially if multiple fields are present.
3838
:::
3939

4040
## ~~Sometimes, using~~ less is more ~~effective, so keep things simple~~
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title: What's new in version 25.03?
3+
description: Get to know the features, fixes, and functionality new in webforJ version 25.03.
4+
slug: whats-new-v25.03
5+
date: 2025-09-09
6+
authors: webforJ
7+
tags: [webforJ, v25.03, release]
8+
image: "https://cdn.webforj.com/webforj-documentation/blogs/webforj-v25.03/cover.png"
9+
hide_table_of_contents: false
10+
---
11+
12+
![cover image](https://cdn.webforj.com/webforj-documentation/blogs/webforj-v25.03/cover.png)
13+
14+
webforJ version `25.03` introduces new capabilities for configuration management, Spring integration options, routing improvements, and `Table` component updates.
15+
16+
<!-- truncate -->
17+
18+
As always, see the [GitHub release overview](https://github.com/webforj/webforj/releases/tag/25.03) for a more comprehensive list of changes. Highlighted below are some of the most exciting changes:
19+
20+
## New features and enhancements 🎉
21+
22+
### Early lifecycle hooks for configuration management
23+
24+
webforJ `25.03` introduces `onWillCreate` and `onDidCreate` lifecycle hooks that give control over app initialization. These new hooks fire at critical moments during startup – `onWillCreate` executes before your app instance is created, while `onDidCreate` runs immediately after creation but before serving requests.
25+
26+
These additions solve a common challenge in enterprise applications: performing operations like validating environment variables, configuring logging systems, or establishing database connections at exactly the right moment during startup. With these hooks, you can now modify configuration before it locks, validate prerequisites, and set up resources your app depends on.
27+
28+
:::info
29+
For implementation details, see the [Lifecycle Listeners](/docs/advanced/lifecycle-listeners) documentation.
30+
:::
31+
32+
### Spring properties file configuration support
33+
34+
Configuration with Spring Boot has seen improvements in `25.03`. Configure your webforJ applications directly in `application.properties` or `application.yml` files using the `webforj.*` prefix – from servlet mappings and debug settings to file upload limits and custom servlet registration.
35+
36+
The system respects Spring Boot's configuration hierarchy, so properties from environment variables, command-line arguments, and external configuration sources all work as expected.
37+
38+
:::tip Migration path
39+
Moving from `webforj.conf` to Spring properties? Both approaches work side-by-side during migration. Spring properties take precedence when both are present, allowing for gradual transition.
40+
:::
41+
42+
:::info
43+
For configuration examples and details, see the [Spring Integration](/docs/integrations/spring/overview) documentation.
44+
:::
45+
46+
### Spring MVC coexistence at root path
47+
48+
webforJ `25.03` enables seamless integration with Spring MVC when deployed at the root path ("/"). This solves a challenge where webforJ's servlet registration at root would conflict with Spring's DispatcherServlet, preventing the use of REST endpoints and Spring MVC controllers alongside webforJ routes.
49+
50+
The new integration approach registers the webforJ servlet at an internal path and forwards requests through Spring MVC's handler chain. This maintains full compatibility with Spring features like filters, interceptors, and other handler mappings while preserving webforJ's routing capabilities. Now you can build hybrid applications that leverage both Spring MVC REST endpoints for APIs and webforJ routes for rich UI components.
51+
52+
When webforJ is mapped to the root context, you can exclude specific URL patterns from webforJ handling using the `webforj.exclude-urls` property. This allows Spring MVC controllers to handle paths like `/api/**` for REST endpoints or `/actuator/**` for Spring Boot actuator endpoints, while webforJ handles all other routes.
53+
54+
### Spring custom scopes for webforJ environments and routes
55+
56+
Version `25.03` introduces three powerful Spring scope annotations designed specifically for component-based architectures: `@WebforjSessionScope`, `@EnvironmentScope` and `@RouteScope`. These new scopes align bean lifecycles with webforJ's runtime model, ensuring beans exist exactly as long as they're needed.
57+
58+
[![webforJ spring scopes](/img/spring-scopes.svg)](/img/spring-scopes.svg)
59+
60+
`@WebforjSessionScope` creates beans that persist across the entire webforJ session, shared across all browser tabs and windows from the same browser. Unlike environment-scoped beans which isolate state per tab, session-scoped beans maintain shared state for authentication, user preferences, and shopping carts. When a user logs in through one tab, all other tabs immediately have access to the authenticated state.
61+
62+
`@EnvironmentScope` ties beans to individual browser windows or tabs – each tab gets its own isolated instance, ideal for tab-specific state that shouldn't be shared across windows. Beans remain available throughout the entire tab session, perfect for maintaining UI state, user preferences, or cached data specific to that browser context.
63+
64+
`@RouteScope` binds beans to route hierarchies, where parent and child routes share instances but navigating to different route trees creates fresh beans. This scope is particularly useful for managing state within multi-step workflows or nested route structures, ensuring data consistency within a route context while providing clean separation between different application areas. For finer control, the `@SharedFrom` annotation lets you customize scope boundaries, restricting bean availability to specific component subtrees and enforcing architectural boundaries with runtime validation.
65+
66+
:::info
67+
Learn more about Spring integration and custom scopes in the [Spring integration](/docs/integrations/spring/scopes) documentation.
68+
:::
69+
70+
### Table column sizing and moving support
71+
72+
The `Table` has been enhanced in this release to introduce comprehensive column manipulation capabilities. Users can now drag column borders to resize, and drag headers to reorder their respective columns.
73+
74+
The new column management APIs offer both interactive and programmatic control. Set width constraints with `setMinWidth()` and `setMaxWidth()`, enable resizing with `setResizable(true)`, allow reordering with `setMovable(true)`, and implement flex sizing with `setFlex()` for responsive layouts. Event listeners for resize and move operations enable preference persistence and custom state management.
75+
76+
These features are particularly valuable in data-heavy applications like financial dashboards and reporting tools, where different users need to arrange columns to match their workflow patterns.
77+
78+
<ComponentDemo
79+
path='/webforj/tablecolumnautosizing?'
80+
javaE='https://raw.githubusercontent.com/webforj/webforj-documentation/refs/heads/main/src/main/java/com/webforj/samples/views/table/TableColumnAutoSizingView.java'
81+
urls={['https://raw.githubusercontent.com/webforj/webforj-documentation/refs/heads/main/src/main/java/com/webforj/samples/views/table/MusicRecord.java',
82+
'https://raw.githubusercontent.com/webforj/webforj-documentation/refs/heads/main/src/main/java/com/webforj/samples/views/table/Service.java']}
83+
height='550px'
84+
/>
85+
86+
:::info
87+
Visit the [Columns](/docs/components/table/columns) article for more detailed implementation of columns inside a `Table`.
88+
:::
89+
90+
### SessionObjectTable for HTTP session-scoped storage
91+
92+
webforJ `25.03` introduces `SessionObjectTable`, a new addition to the existing `ObjectTable` and `StringTable` utilities. While the original tables provide environment-scoped storage for shared data across your application, `SessionObjectTable` brings HTTP session-scoped storage capabilities when running in Jakarta Servlet 6.1+ containers.
93+
94+
`SessionObjectTable` lets devs manage user-specific state in servlet environments, storing serializable objects that persist across all browser tabs and windows for a single user session. It provides the same static API methods like `put()`, `get()`, `contains()`, and `clear()`, but with session-level persistence. This is useful for managing authentication state, user preferences, and features like shopping carts across multiple tabs.
95+
96+
This addition completes the storage hierarchy in webforJ, giving you the right scoping tool for every need: `StringTable` for persistent configuration, `ObjectTable` for environment-scoped data, and now `SessionObjectTable` for true HTTP session management.
97+
98+
:::info
99+
Learn more about data storage options in the [Object and String Tables](/docs/advanced/object-string-tables) documentation.
100+
:::
101+
102+
### Router Activate lifecycle event for cached components
103+
104+
Routing has had the `ActivateEvent` and `ActivateObserver` interfaces added to handle component reactivation. When users navigate back to a cached component, the `onActivate()` method fires, allowing you to refresh data while preserving component state – developers will no longer be forced to choose between recreating entire components or manually checking for changes.
105+
106+
This feature shines in parameter-driven routes. Navigate from `/customer/123` to `/customer/456`, and the component stays cached while `onActivate` provides an opportunity to load new customer data. User inputs, form state, and expensive initializations all persist, while only the relevant data refreshes.
107+
108+
### Automatic browser launch for Spring Boot development
109+
110+
Finally, a little quality of life enhancement for developers - automatic browser launch has been added in webforJ `25.03`. When running Spring Boot applications in development mode, webforJ can now automatically open your default browser to the application URL, removing the need to manually type localhost addresses.
111+
112+
Configure this feature through simple application properties: enable it with `webforj.devtools.browser.open=true` and choose your preferred host resolution with `webforj.devtools.browser.host`. Whether you prefer `localhost`, your machine's hostname, or a specific IP address for remote access testing, the browser launcher can be configured for your development setup.
113+
114+
## Upgrade notes
115+
116+
When upgrading to `25.03`, be aware of the following:
117+
118+
- Spring Boot projects can now use the new configuration and scoping features
119+
- Existing lifecycle hooks remain compatible with the new early lifecycle system
120+
- Table components automatically support the new column features without code changes
121+
122+
`25.03` strengthens the webforJ's enterprise offerings with improved Spring integration and component behavior. We're excited to see what you build with these new features!

0 commit comments

Comments
 (0)