Author: amarkhel
Date: 2009-04-07 12:13:24 -0400 (Tue, 07 Apr 2009)
New Revision: 13411
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java
Log:
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java 2009-04-07
16:11:50 UTC (rev 13410)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java 2009-04-07
16:13:24 UTC (rev 13411)
@@ -45,7 +45,9 @@
this.setSelectedShelf(selectedShelf);
this.setSelectedUser(selectedUser);
this.images = images;
- this.setSelectedImageIndex(this.getSelectedAlbum().getIndex(this.getSelectedImage())+1);
+ if(this.getSelectedAlbum() != null && this.getSelectedImage() != null){
+ this.setSelectedImageIndex(this.getSelectedAlbum().getIndex(this.getSelectedImage())+1);
+ }
}
@Observer(Constants.UPDATE_MAIN_AREA_EVENT)