Author: ishabalov
Date: 2007-07-25 19:28:32 -0400 (Wed, 25 Jul 2007)
New Revision: 1857
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
Log:
Fixed bug "component nor found" for welcome.jsf
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2007-07-25
23:25:33 UTC (rev 1856)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2007-07-25
23:28:32 UTC (rev 1857)
@@ -65,7 +65,7 @@
return component;
}
}
- throw new RuntimeException("Component uri=["+uri+"] not found");
+ return null;
}
public ComponentDescriptor findComponentById(String id) {
Iterator it = components_().iterator();
@@ -75,10 +75,14 @@
return component;
}
}
- throw new RuntimeException("Component id=["+id+"] not found");
+ return null;
}
public void setCurrentComponent(ComponentDescriptor currentComponent) {
+ if (currentComponent==null) {
+ setActiveTab(null);
+ this.currentComponent = (ComponentDescriptor)components_().get(0);
+ }
if (this.currentComponent!=null && currentComponent!=null &
!this.currentComponent.equals(currentComponent)) {
setActiveTab(null);
} else if (this.currentComponent==null || currentComponent==null) {
Show replies by date