Skip to content

Conversation

@EHandtkeBasis
Copy link
Member

No description provided.

Copy link
Member

@MatthewHawkins MatthewHawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I'd make sure to deep link the heck out of all of this, whether that's to existing webforJ docs pages, or to outside info on Spring, Jakarta, etc.

Make sure that there's some cursory info given when you introduce a new spring concept.

To get the most out of this tutorial, it’s assumed that you have a basic understanding of Java programming and are familiar with tools like Maven. If you’re new to webforJ, don’t worry - the framework’s fundamentals will be covered along the way.

The following tools/resources should be present on your development machine
To get the most out of this tutorial, you should have a basic understanding of Java and Maven. No prior Spring Boot experience is required—key concepts will be introduced as needed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps after mentioning that Spring Boot experience isn't overtly necessary, providing some reference material for those interested in the basics would be good.


To see the app in action at any stage:

1) Navigate to the directory for the desired step. This should be the top level directory for that step, containing the `pom.xml`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use consistent 1. or 1) throughout articles

@Override
public void run() throws WebforjException {
// App logic
@SpringBootApplication
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have at least a surface level explanation of the @SpringBootApplication annotation

---

### Adding CSS classes to components {#adding-css-classes-to-components}
## 4. Configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configuration section too brief - needs more Spring Boot, H2 and POM explanation, or at the very least deep linking to the appropriate articles.

public void run() throws WebforjException {
// App logic
@SpringBootApplication
@StyleSheet("ws://app.css")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps check with Hyyan here, but it may be a good idea to link the assets section here:

https://docs.webforj.com/docs/managing-resources/assets-protocols#the-webserver-protocol

}

// Getter...
public SpringDataRepository<Customer, Long> getFilterableRepository() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SpringDataRepository wrapper needs more explanation

@@ -1,33 +1,111 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's some fairly significant duplication here - you start around line 21 talking about routing, and then on line 110 you do the same thing, with similar content. Before I go over the rest of this, perhaps consolidate these two sections so I don't correct any stuff that you planned to remove anyway.

});
context.read(customer);
}
public void onDidEnter(DidEnterEvent event, ParametersBag parameters) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

### Binding the fields {#binding-the-fields}

The data binding setup begins with initializing a `BindingContext` for the `Customer` model. The `BindingContext` links the model properties to the form fields, enabling automatic data synchronization. This is set up in the `FormView` constructor.
## Binding the fields
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You link the auto binding section, but I'd add a link to the overview for data binding near the top that people can immediately go to for more info.

## Validating data {#validating-data}

Validation ensures that the data entered into the form adheres to specified rules, improving data quality and preventing invalid submissions. With data binding, validation no longer needs to be manually implemented but instead simply configured, allowing real-time feedback on user inputs.
## Validating data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More info about the annotations used and potential other options would be good.

This step adds data management and display capabilities to the demo app. You’ll define a `Customer` entity, use a Spring Data repository and service for data access, and display customer data in a [`Table`](../../components/table/overview) component.

By the end of this step, the app created in the [previous step](./creating-a-basic-app) will display a table with the created data that can then be expanded on in the following steps. To run the app:
This and all future steps utilize a H2 database. To use H2 with Spring Boot, add the H2 dependency to your pom.xml and set spring.datasource.url=jdbc:h2:mem:testdb in your application.properties. Spring Boot will auto-configure and start the H2 database for you.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[webforJ.Simplify] Consider 'use' instead of 'utilize'.

This step adds data management and display capabilities to the demo app. You’ll define a `Customer` entity, use a Spring Data repository and service for data access, and display customer data in a [`Table`](../../components/table/overview) component.

By the end of this step, the app created in the [previous step](./creating-a-basic-app) will display a table with the created data that can then be expanded on in the following steps. To run the app:
This and all future steps utilize a H2 database. To use H2 with Spring Boot, add the H2 dependency to your pom.xml and set spring.datasource.url=jdbc:h2:mem:testdb in your application.properties. Spring Boot will auto-configure and start the H2 database for you.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'URL' instead of 'url'.

This step adds data management and display capabilities to the demo app. You’ll define a `Customer` entity, use a Spring Data repository and service for data access, and display customer data in a [`Table`](../../components/table/overview) component.

By the end of this step, the app created in the [previous step](./creating-a-basic-app) will display a table with the created data that can then be expanded on in the following steps. To run the app:
This and all future steps utilize a H2 database. To use H2 with Spring Boot, add the H2 dependency to your pom.xml and set spring.datasource.url=jdbc:h2:mem:testdb in your application.properties. Spring Boot will auto-configure and start the H2 database for you.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'app' instead of 'application'.

@hyyan hyyan marked this pull request as draft October 16, 2025 06:16
@hyyan hyyan added status: blocked Waiting on external dependency or details status: waiting-for-author Review is done. Waiting for the PR author to apply changes or respond. and removed status: blocked Waiting on external dependency or details labels Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-author Review is done. Waiting for the PR author to apply changes or respond.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webforJ Tutorial refactor to use Spring

4 participants