Changeset 249

Show
Ignore:
Timestamp:
03/02/06 16:10:55
Author:
douglm
Message:

Change debugging message
Sort list of calendars using RuleBasedCollator?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/BwCalendar.java

    r161 r249  
    6868 * if this is intended to hold a collection of calendar objects. 
    6969 * 
    70  *   @author Mike Douglass douglm@rpi.edu 
     70 *   @author Mike Douglass douglm @ rpi.edu 
    7171 *  @version 1.0 
    7272 */ 
  • trunk/calendar3/common/src/edu/rpi/sss/util/jsp/ErrorEmitSvlt.java

    r2 r249  
    396396 
    397397  protected void debugMsg(String pname, String ptype, String pval) { 
    398     debugOut("Error emitted: property=" + pname + 
     398    debugOut("Emitted: property=" + pname + 
    399399             " ptype=" + ptype + 
    400400             " val(s)=" + pval); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/BwActionFormBase.java

    r191 r249  
    8888import net.fortuna.ical4j.model.Calendar; 
    8989 
     90import java.text.Collator; 
    9091import java.util.Collection; 
    9192import java.util.HashMap; 
     93import java.util.Iterator; 
     94import java.util.TreeMap; 
    9295import java.util.Vector; 
    9396import javax.servlet.http.HttpServletRequest; 
     
    105108  private CalEnv env; 
    106109 
     110  // XXX locale - needs to be changed when locale changes 
     111  private Collator listCollator = Collator.getInstance(); 
     112   
    107113  /* This should be a cloned copy only */ 
    108114  private BwSystem syspars; 
     
    10291035    val = Util.checkNull(val); 
    10301036    if (val != null) { 
    1031       Integer i = (Integer)viewTypeMap.get(viewType); 
     1037      Integer i = (Integer)viewTypeMap.get(val); 
    10321038 
    10331039      if (i != null) { 
     
    14311437  public Collection getAddContentCalendarCollections() { 
    14321438    try { 
    1433       return fetchSvci().getAddContentCalendarCollections(); 
     1439      TreeMap tm = new TreeMap(listCollator); 
     1440       
     1441      Iterator it = fetchSvci().getAddContentCalendarCollections().iterator(); 
     1442       
     1443      while (it.hasNext()) { 
     1444        BwCalendar cal = (BwCalendar)it.next(); 
     1445        tm.put(cal.getName(), cal); 
     1446      } 
     1447 
     1448      return tm.values(); 
     1449//      return fetchSvci().getAddContentCalendarCollections(); 
    14341450    } catch (Throwable t) { 
    14351451      err.emit(t);