1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.example.demo;
21
22 import javax.enterprise.context.SessionScoped;
23 import javax.inject.Named;
24 import java.io.Serializable;
25
26 @Named
27 @SessionScoped
28 public class AttributeController implements Serializable {
29
30 private int counter;
31 private boolean condition;
32
33 public String update() {
34 return "/content/40-test/9000-attribute/attribute.xhtml?faces-redirect=true";
35 }
36
37 public String reload() {
38 counter++;
39 return null;
40 }
41
42 public int getCounter() {
43 return counter;
44 }
45
46 public void setCounter(final int counter) {
47 this.counter = counter;
48 }
49
50 public boolean isCondition() {
51 return condition;
52 }
53
54 public void setCondition(final boolean condition) {
55 this.condition = condition;
56 }
57
58 public String getValue() {
59 return "value from model";
60 }
61 }