Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 1-creating-a-basic-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ webforj-tutorial
├───2-working-with-data
├───3-routing-and-composites
├───4-observers-and-route-parameters
└───5-validating-and-binding-data
├───5-validating-and-binding-data
└───6-integrating-an-app-layout
```

## Running the App (Spring Boot)
Expand Down
3 changes: 2 additions & 1 deletion 2-working-with-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ webforj-tutorial
├───2-working-with-data
├───3-routing-and-composites
├───4-observers-and-route-parameters
└───5-validating-and-binding-data
├───5-validating-and-binding-data
└───6-integrating-an-app-layout
```

## Running the App (Spring Boot)
Expand Down
3 changes: 2 additions & 1 deletion 3-routing-and-composites/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ webforj-tutorial
├───2-working-with-data
├───3-routing-and-composites
├───4-observers-and-route-parameters
└───5-validating-and-binding-data
├───5-validating-and-binding-data
└───6-integrating-an-app-layout
```

## Running the App (Spring Boot)
Expand Down
3 changes: 2 additions & 1 deletion 4-observers-and-route-parameters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ webforj-tutorial
├───2-working-with-data
├───3-routing-and-composites
├───4-observers-and-route-parameters
└───5-validating-and-binding-data
├───5-validating-and-binding-data
└───6-integrating-an-app-layout
```

## Running the App (Spring Boot)
Expand Down
3 changes: 2 additions & 1 deletion 5-validating-and-binding-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ webforj-tutorial
├───2-working-with-data
├───3-routing-and-composites
├───4-observers-and-route-parameters
└───5-validating-and-binding-data
├───5-validating-and-binding-data
└───6-integrating-an-app-layout
```

## Running the App (Spring Boot)
Expand Down
15 changes: 15 additions & 0 deletions 6-integrating-an-app-layout/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
44 changes: 44 additions & 0 deletions 6-integrating-an-app-layout/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

**/target
/.idea
/.claude
*.iml
/.project
/.classpath
**/sample/

/.settings/org.eclipse.core.resources.prefs
/.settings/org.eclipse.jdt.core.prefs
/.settings/org.eclipse.m2e.core.prefs

bbj/.bdtPath
bbj/.buildpath
bbj/.project

.DS_Store
*.versionsBackup

26 changes: 26 additions & 0 deletions 6-integrating-an-app-layout/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"java.configuration.updateBuildConfiguration": "interactive",
"java.completion.favoriteStaticMembers": [
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*",
"com.webforj.component.optiondialog.OptionDialog.*",
"com.webforj.App.console",
],
"java.completion.filteredTypes": [
"java.awt.*",
"com.sun.*",
"sun.*",
"jdk.*",
"org.graalvm.*",
"io.micrometer.shaded.*",
"com.basis.*",
"javax.swing.*",
],
}
61 changes: 61 additions & 0 deletions 6-integrating-an-app-layout/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

# webforJ Customer Management Tutorial App (Spring Boot)

This project demonstrates how to build a customer management app using the **webforJ framework** with Spring Boot. The app showcases modern web UI development while leveraging Spring’s backend ecosystem, including dependency injection, service layers, and data management.

For a complete step-by-step guide to building this app, see the **[webforJ Tutorial](https://docs.webforj.com/docs/introduction/tutorial/overview)**.

---

## Prerequisites

To run the app, ensure the following tools are installed:

- Java 17 or higher
- Maven
- A Java IDE (e.g., IntelliJ IDEA, Eclipse, VSCode)
- Web browser
- Git (recommended)

---

## Project Structure

```bash
webforj-tutorial
│ .gitignore
│ LICENSE
│ README.md
│ tree.txt
├───1-creating-a-basic-app
├───2-working-with-data
├───3-routing-and-composites
├───4-observers-and-route-parameters
├───5-validating-and-binding-data
└───6-integrating-an-app-layout
```

## Running the App (Spring Boot)

1. Navigate to the desired step directory (e.g., `1-creating-a-basic-app`):
```sh
cd 1-creating-a-basic-app
```
2. Start the Spring Boot application:
```sh
mvn
```
3. Open your browser and go to [http://localhost:8080](http://localhost:8080).

## Project Highlights

- **Spring Boot integration:** Autowire Spring beans directly into webforJ views and components.
- **Data binding and validation:** Use standard Java validation annotations and webforJ data binding features.
- **Spring Data support:** Connect UI components to your data layer using Spring repositories.
- **Hot reload:** Automatic browser refresh with Spring DevTools.
- **Familiar development:** Continue using Spring annotations like `@Service`, `@Repository`, and `@Component`.
- **Flexible configuration:** Combine `application.properties` with `webforj.conf` for complete control.

## License
This project is licensed under the MIT License. See the LICENSE file for details.
149 changes: 149 additions & 0 deletions 6-integrating-an-app-layout/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.4</version>
<relativePath/>
</parent>
<groupId>com.webforj.tutorial</groupId>
<artifactId>customer-app</artifactId>
<version>1.0-SNAPSHOT</version>
<name>CustomerApplication</name>
<properties>
<webforj.version>25.10</webforj.version>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.webforj</groupId>
<artifactId>webforj-bom</artifactId>
<version>${webforj.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.webforj</groupId>
<artifactId>webforj</artifactId>
</dependency>
<dependency>
<groupId>com.webforj</groupId>
<artifactId>webforj-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.webforj</groupId>
<artifactId>webforj-spring-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.49.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>central-portal-snapshots</id>
<name>Central Portal Snapshots</name>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</repository>
</repositories>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludeDevtools>true</excludeDevtools>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>prod</id>
<activation />
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludeDevtools>true</excludeDevtools>
<excludes>
<exclude>
<groupId>com.webforj</groupId>
<artifactId>webforj-spring-devtools</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.webforj.tutorial;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.webforj.App;
import com.webforj.annotation.AppProfile;
import com.webforj.annotation.AppTheme;
import com.webforj.annotation.StyleSheet;
import com.webforj.annotation.Routify;

@SpringBootApplication
@StyleSheet("ws://css/card.css")
@AppTheme("system")
@Routify(packages = "com.webforj.tutorial.views")
@AppProfile(name = "Customer Application", shortName = "CustomerApp")
public class Application extends App {

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
Loading