Author: Alex.Kolonitsky
Date: 2010-05-19 08:55:35 -0400 (Wed, 19 May 2010)
New Revision: 17122
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
Log:
fix checkstyle
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java 2010-05-19
12:46:50 UTC (rev 17121)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoDescriptor.java 2010-05-19
12:55:35 UTC (rev 17122)
@@ -3,7 +3,6 @@
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementWrapper;
public class DemoDescriptor extends BaseDescriptor {
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-19
12:46:50 UTC (rev 17121)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-19
12:55:35 UTC (rev 17122)
@@ -18,6 +18,28 @@
@ManagedBean
@SessionScoped
public class DemoNavigator {
+
+ private static Converter demoViewConverter = new Converter() {
+
+ public String getAsString(FacesContext context, UIComponent component, Object
value) {
+ return (String) value;
+ }
+
+ public Object getAsObject(FacesContext context, UIComponent component, String
value) {
+ NavigationHandler handler = context.getApplication().getNavigationHandler();
+
+ if (handler instanceof ConfigurableNavigationHandler) {
+ ConfigurableNavigationHandler navigationHandler =
(ConfigurableNavigationHandler) handler;
+
+ NavigationCase navCase = navigationHandler.getNavigationCase(context,
null, "/richfaces/" + value);
+
+ return navCase.getToViewId(context);
+ }
+
+ return null;
+ }
+ };
+
@ManagedProperty(value = "#{navigationParser.groupsList}")
private List<GroupDescriptor> groups;
private DemoDescriptor currentDemo = null;
@@ -37,7 +59,7 @@
if (null != currentDemo) {
if (null != currentSample) {
currentDemo.setActiveSampleById(currentSample);
- }else{
+ } else {
currentDemo.setActiveSample(currentDemo.getSamples().get(0));
currentSample = currentDemo.getActiveSample().getId();
}
@@ -126,27 +148,6 @@
System.out.println("DemoNavigator.preRenderEvent()");
}
- private static Converter demoViewConverter = new Converter() {
-
- public String getAsString(FacesContext context, UIComponent component, Object
value) {
- return (String) value;
- }
-
- public Object getAsObject(FacesContext context, UIComponent component, String
value) {
- NavigationHandler handler = context.getApplication().getNavigationHandler();
-
- if (handler instanceof ConfigurableNavigationHandler) {
- ConfigurableNavigationHandler navigationHandler =
(ConfigurableNavigationHandler) handler;
-
- NavigationCase navCase = navigationHandler.getNavigationCase(context,
null, "/richfaces/" + value);
-
- return navCase.getToViewId(context);
- }
-
- return null;
- }
- };
-
public Converter getDemoViewConverter() {
return demoViewConverter;
}