Biography example working better.
This commit is contained in:
parent
30e463f1cf
commit
526f01c683
@ -7,16 +7,11 @@ import jakarta.inject.Inject
|
|||||||
@PageSpec(name = 'Biography', path = '/biography')
|
@PageSpec(name = 'Biography', path = '/biography')
|
||||||
class Biography extends WvcPageView {
|
class Biography extends WvcPageView {
|
||||||
|
|
||||||
|
static final String greeting = 'Hello, World!'
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
Biography() {
|
Biography() {
|
||||||
super(Biography.getResource('BiographyTemplate.wvc'))
|
super(Biography.getResource('BiographyTemplate.wvc'))
|
||||||
println 'Hello from Biography!'
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
void renderTo(Writer out) throws IOException {
|
|
||||||
println "Rendering: $pageTitle..."
|
|
||||||
super.renderTo(out)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
---
|
---
|
||||||
package com.jessebrault.site
|
package com.jessebrault.site
|
||||||
---
|
---
|
||||||
Hello, World!
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>$pageTitle</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>$pageTitle</h1>
|
||||||
|
<h2>$url</h2>
|
||||||
|
<p>$greeting</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user