private void showScheduleActivities(Schedule s) {

        Integer[] temp = s.getActivities().toArray(new Integer[0]);
        //Activity[] activities;

        //System.out.println("uacts: " + Arrays.toString(temp));
        if (temp.length > 0) {
            //fetch all activities
            //activities = new Activity[temp.length];
            //for (int i = 0; i < temp.length; ++i) {
            //    activities[i] = (Activity) MongoHelper.fetch(new Activity(temp[i]),
            //            MongoHelper.ACTIVITY_COLLECTION);
            //}

            activityNames = new String[temp.length];

            //get the names of the activities for our list
            for (int i = 0; i < temp.length; ++i) {
                //System.out.println("a" + i + "name: " + activities[i].getName());
                activityNames[i] = manager.getActivityById(temp[i]).getName();
            }

            //System.out.println("anames: " + Arrays.toString(getActivityNames));
            //sort alphabetical
            if (activityNames.length > 1) {
                Arrays.sort(activityNames);
            }

        }

        if (activityList != null && activityNames != null) {
            activityList.setModel(new javax.swing.AbstractListModel() {
                String[] strings = activityNames;

                @Override
                public int getSize() {
                    return strings.length;
                }

                @Override
                public Object getElementAt(int i) {
                    return strings[i];
                }
            });
            this.repaint();
        }
    }