0
|
1 package org.ssdt_ohio.devel.forms.components;
|
|
2
|
|
3 import com.trsvax.bootstrap.annotations.Exclude;
|
|
4 import org.apache.tapestry5.*;
|
|
5 import org.apache.tapestry5.annotations.*;
|
|
6 import org.apache.tapestry5.ioc.annotations.*;
|
|
7 import org.apache.tapestry5.BindingConstants;
|
|
8 import org.apache.tapestry5.SymbolConstants;
|
|
9
|
|
10 @Exclude(stylesheet = {"core"})
|
|
11 @Import(stylesheet = {"classpath:/com/trsvax/bootstrap/assets/bootstrap/css/bootstrap.css",
|
|
12 "classpath:/com/trsvax/bootstrap/assets/bootstrap/css/bootstrap-responsive.css",
|
|
13 "context:layout/layout.css"},
|
|
14 library = {"classpath:/com/trsvax/bootstrap/assets/bootstrap/js/bootstrap.js"})
|
|
15 public class Layout
|
|
16 {
|
|
17 /**
|
|
18 * The page title, for the <title> element and the <h1> element.
|
|
19 */
|
|
20 @Property
|
|
21 @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
|
|
22 private String title;
|
|
23
|
|
24 @Property
|
|
25 private String pageName;
|
|
26
|
|
27 @Inject
|
|
28 private ComponentResources resources;
|
|
29
|
|
30 @Property
|
|
31 @Inject
|
|
32 @Symbol(SymbolConstants.APPLICATION_VERSION)
|
|
33 private String appVersion;
|
|
34
|
|
35
|
|
36 public String getClassForPageName()
|
|
37 {
|
|
38 return resources.getPageName().equalsIgnoreCase(pageName)
|
|
39 ? "current_page_item"
|
|
40 : null;
|
|
41 }
|
|
42
|
|
43 public String[] getPageNames()
|
|
44 {
|
|
45 return new String[]{"Index", "OneTwentyPayment"};
|
|
46 }
|
|
47 }
|