Package org.apache.myfaces.custom.schedule.model

Examples of org.apache.myfaces.custom.schedule.model.SimpleScheduleModel


     */
    private void initModel()
    {
        if (model == null)
        {
            model = new SimpleScheduleModel();
        }

        this.date = new Date();

        model.setMode(mode.intValue());
View Full Code Here


            return;
        if (!appointmentStart.before(appointmentEnd))
            return;
        if (appointmentTitle == null || appointmentTitle.length() < 1)
            return;
        SimpleScheduleModel model = (SimpleScheduleModel) scheduleBean
                .getModel();
        DefaultScheduleEntry appointment = new DefaultScheduleEntry();
        //we need a unique id, let's take the current time in milliseconds
        appointment.setId(String.valueOf(System.currentTimeMillis()));
        appointment.setStartTime(appointmentStart);
        appointment.setEndTime(appointmentEnd);
        appointment.setTitle(appointmentTitle);
        appointment.setSubtitle(appointmentLocation == null ? ""
                : appointmentLocation);
        appointment.setDescription(appointmentComments == null ? ""
                : appointmentComments);
        model.addEntry(appointment);
        model.refresh();
        appointmentStart = new Date();
        appointmentEnd = new Date();
        appointmentTitle = "";
        appointmentLocation = "";
        appointmentComments = "";
View Full Code Here

     */
    public void removeAppointment(ActionEvent event)
    {
        if (scheduleBean == null)
            return;
        SimpleScheduleModel model = (SimpleScheduleModel) scheduleBean
                .getModel();
        model.removeEntry(model.getSelectedEntry());
        model.setSelectedEntry(null);
        model.refresh();
    }
View Full Code Here

    {
        if (scheduleBean == null)
            return;
        if (holidayDate == null)
            return;
        SimpleScheduleModel model = (SimpleScheduleModel) scheduleBean
                .getModel();
        if (holidayName != null && holidayName.length() < 1)
            holidayName = null;
        model.setHoliday(holidayDate, holidayName);
        model.refresh();
        holidayDate = new Date();
        holidayName = "";
    }
View Full Code Here

    public ScheduleModel getModel()
    {
        if (getValue() instanceof ScheduleModel) {
            return (ScheduleModel) getValue();
        } else {
            return new SimpleScheduleModel();
        }
    }
View Full Code Here

        {
            return (ScheduleModel) getValue();
        }
        else
        {
            return new SimpleScheduleModel();
        }
    }
View Full Code Here

        {
            return (ScheduleModel) getValue();
        }
        else
        {
            return new SimpleScheduleModel();
        }
    }
View Full Code Here

    public void addSampleHoliday(ActionEvent event)
    {
        if (model instanceof SimpleScheduleModel)
        {
            SimpleScheduleModel ssm = (SimpleScheduleModel) model;
            Calendar calendar = GregorianCalendar.getInstance();
            calendar.setTime(ssm.getSelectedDate());
            calendar.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);
            ssm.setHoliday(calendar.getTime(), "Poeperkesdag");
            ssm.refresh();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.custom.schedule.model.SimpleScheduleModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.