forked from spring-attic/spring-mvc-showcase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add '@PathVariables available in the model when rendering' and 'Data …
…binding with URI variables' under the Views tab
- Loading branch information
1 parent
65fa25d
commit cba02da
Showing
5 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
src/main/java/org/springframework/samples/mvc/mapping/JavaBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/org/springframework/samples/mvc/views/JavaBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.springframework.samples.mvc.views; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
public class JavaBean { | ||
|
||
@NotNull | ||
private String foo; | ||
|
||
@NotNull | ||
private String fruit; | ||
|
||
public String getFoo() { | ||
return foo; | ||
} | ||
|
||
public void setFoo(String foo) { | ||
this.foo = foo; | ||
} | ||
|
||
public String getFruit() { | ||
return fruit; | ||
} | ||
|
||
public void setFruit(String fruit) { | ||
this.fruit = fruit; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | ||
<%@ page session="false" %> | ||
<html> | ||
<head> | ||
<title>My HTML View (Data Binding)</title> | ||
</head> | ||
<body> | ||
<h1>foo = ${javaBean.foo}</h1> | ||
<h1>fruit = ${javaBean.fruit}</h1> | ||
</body> | ||
</html> |