1 26 27 package org.nextime.ion.frontoffice.objectSelector; 28 29 import java.util.Collection ; 30 import java.util.Collections ; 31 import java.util.Hashtable ; 32 import java.util.Vector ; 33 34 import javax.servlet.http.HttpServletRequest ; 35 import javax.servlet.http.HttpServletResponse ; 36 37 import org.nextime.ion.framework.business.Section; 38 import org.nextime.ion.framework.logger.Logger; 39 import org.nextime.ion.framework.mapping.Mapping; 40 41 44 public class NavigationBar implements ObjectSelector { 45 46 public Collection selectObjects(Hashtable params, HttpServletRequest request, HttpServletResponse response) throws SelectException { 47 try { 48 String currentSection = (String )params.get("currentSection"); 50 Vector v = new Vector (); 51 Section current = Section.getInstance(currentSection); 52 while( current != null ) { 53 v.add( current ); 54 current = current.getParent(); 55 } 56 Collections.reverse(v); 57 return v; 59 } catch (Exception e) { 60 Logger.getInstance().error("Erreur du SelectObject",this,e); 61 throw new SelectException(e.getMessage()); 62 } 63 } 64 65 } | Popular Tags |