Author: ilya_shaikovsky
Date: 2011-01-31 08:40:36 -0500 (Mon, 31 Jan 2011)
New Revision: 21321
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/DayStatistics.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/PassTime.java
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
Log:
names correction + checkstyle fixes
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/DayStatistics.java
===================================================================
---
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/DayStatistics.java 2011-01-31
13:36:28 UTC (rev 21320)
+++
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/DayStatistics.java 2011-01-31
13:40:36 UTC (rev 21321)
@@ -23,40 +23,37 @@
@RequestScoped
public class DayStatistics {
- public DayStatistics() {
- dayPasstimes.add(new PassTime("Sport", 0));
- dayPasstimes.add(new PassTime("Entertainment", 0));
- dayPasstimes.add(new PassTime("Sleeping", 0));
- dayPasstimes.add(new PassTime("Games", 0));
- }
+ private List<PassTime> dayPasstimes = new ArrayList<PassTime>();
- private List<PassTime> dayPasstimes = new ArrayList<PassTime>();
+ public DayStatistics() {
+ dayPasstimes.add(new PassTime("Sport", 0));
+ dayPasstimes.add(new PassTime("Entertainment", 0));
+ dayPasstimes.add(new PassTime("Sleeping", 0));
+ dayPasstimes.add(new PassTime("Games", 0));
+ }
- public List<PassTime> getDayPasstimes() {
- return dayPasstimes;
- }
+ public List<PassTime> getDayPasstimes() {
+ return dayPasstimes;
+ }
- public void setDayPasstimes(List<PassTime> dayPasstimes) {
- this.dayPasstimes = dayPasstimes;
- }
+ public void setDayPasstimes(List<PassTime> dayPasstimes) {
+ this.dayPasstimes = dayPasstimes;
+ }
- @NotNull
- @Min(value = 1, message = "Please feel at list one entry")
- @Max(value = 24, message = "Only 24h in a day!")
- public Integer getTotalTime() {
- Integer result = new Integer(0);
- for (PassTime passtime : dayPasstimes) {
- result += passtime.getTime();
- }
- return result;
- }
+ @NotNull
+ @Min(value = 1, message = "Please feel at list one entry")
+ @Max(value = 24, message = "Only 24h in a day!")
+ public Integer getTotalTime() {
+ Integer result = new Integer(0);
+ for (PassTime passtime : dayPasstimes) {
+ result += passtime.getTime();
+ }
+ return result;
+ }
- public void store(ActionEvent event) {
- FacesContext.getCurrentInstance().addMessage(
- event.getComponent().getClientId(
- FacesContext.getCurrentInstance()),
- new FacesMessage(FacesMessage.SEVERITY_INFO,
- "Changes Stored Successfully",
- "Changes Stored Successfully"));
- }
+ public void store(ActionEvent event) {
+ FacesContext.getCurrentInstance().addMessage(
+ event.getComponent().getClientId(FacesContext.getCurrentInstance()),
+ new FacesMessage(FacesMessage.SEVERITY_INFO, "Changes Stored
Successfully", "Changes Stored Successfully"));
+ }
}
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/PassTime.java
===================================================================
---
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/PassTime.java 2011-01-31
13:36:28 UTC (rev 21320)
+++
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/PassTime.java 2011-01-31
13:40:36 UTC (rev 21321)
@@ -9,29 +9,33 @@
public class PassTime {
- public PassTime(String title, Integer time) {
- setTitle(title);
- setTime(time);
- }
-
- @NotEmpty
- @Length(max=15, min=3)
- private String title;
- @NotNull
- @Min(0)
- @Max(12)
- private Integer time;
- public String getTitle() {
- return title;
- }
- public void setTitle(String title) {
- this.title = title;
- }
- public Integer getTime() {
- return time;
- }
- public void setTime(Integer time) {
- this.time = time;
- }
-
+ @NotEmpty
+ @Length(max = 15, min = 3)
+ private String title;
+ @NotNull
+ @Min(0)
+ @Max(12)
+ private Integer time;
+
+ public PassTime(String title, Integer time) {
+ setTitle(title);
+ setTime(time);
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public Integer getTime() {
+ return time;
+ }
+
+ public void setTime(Integer time) {
+ this.time = time;
+ }
+
}
Modified:
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-01-31
13:36:28 UTC (rev 21320)
+++
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-01-31
13:40:36 UTC (rev 21321)
@@ -283,11 +283,11 @@
</demo>
<demo>
<id>subTableToggleControl</id>
- <name>rich:subTableToggleControl</name>
+ <name>rich:collapsibleSubTableToggler</name>
<samples>
<sample>
<id>subTableToggleControl</id>
- <name>rich:subTableToggleControl Basic Usage</name>
+ <name>rich:collapsibleSubTableToggler Basic Usage</name>
</sample>
</samples>
</demo>