Package org.primefaces.model

Examples of org.primefaces.model.ScheduleModel


        }
  }
 
  protected void encodeEvents(FacesContext context, Schedule schedule) throws IOException {
    String clientId = schedule.getClientId(context);
    ScheduleModel model = (ScheduleModel) schedule.getValue();
    Map<String,String> params = context.getExternalContext().getRequestParameterMap();
   
        if(model instanceof LazyScheduleModel) {
            String startDateParam = params.get(clientId + "_start");
            String endDateParam = params.get(clientId + "_end");
View Full Code Here


public class ScheduleRenderer extends CoreRenderer implements PartialRenderer {
 
  public void decode(FacesContext facesContext, UIComponent component) {
    Schedule schedule = (Schedule) component;
    ScheduleModel model = (ScheduleModel) schedule.getValue();
    String clientId = schedule.getClientId(facesContext);
    Map<String, String> params = facesContext.getExternalContext().getRequestParameterMap();

    if(params.containsKey(schedule.getClientId(facesContext))) {
      String selectedEventParam = clientId + "_selectedEventId";
      String selectedDateParam = clientId + "_selectedDate";
      String changedEventParam = clientId + "_changedEventId";
     
      //Event select
      if(params.containsKey(selectedEventParam)) {
        String eventId = params.get(selectedEventParam);
        ScheduleEvent selectedEvent = model.getEvent(eventId);
        schedule.queueEvent(new ScheduleEntrySelectEvent(schedule, selectedEvent));
      }
      //Date Select
      else if(params.containsKey(selectedDateParam)) {
        String dateAsString = params.get(selectedDateParam);
        schedule.queueEvent(new DateSelectEvent(component, new Date(Long.valueOf(dateAsString))));
      }
      //Event dragdrop or resize
      else if(params.containsKey(changedEventParam)) {
        String eventId = params.get(changedEventParam);
        ScheduleEvent changedEvent = model.getEvent(eventId);
        int dayDelta = Integer.valueOf(params.get(clientId + "_dayDelta"));
        int minuteDelta = Integer.valueOf(params.get(clientId + "_minuteDelta"));
        Calendar calendar = Calendar.getInstance();
        boolean isResize = params.containsKey(clientId + "_resized");
       
View Full Code Here

  }
 
  public void encodePartially(FacesContext facesContext, UIComponent component) throws IOException {
    Schedule schedule = (Schedule) component;
    String clientId = schedule.getClientId(facesContext);
    ScheduleModel model = (ScheduleModel) schedule.getValue();
    Map<String,String> params = facesContext.getExternalContext().getRequestParameterMap();
   
    String startDateParam = params.get(clientId + "_start");
    String endDateParam = params.get(clientId + "_end");
View Full Code Here

        }
  }
 
  protected void encodeEvents(FacesContext context, Schedule schedule) throws IOException {
    String clientId = schedule.getClientId(context);
    ScheduleModel model = (ScheduleModel) schedule.getValue();
    Map<String,String> params = context.getExternalContext().getRequestParameterMap();
   
    String startDateParam = params.get(clientId + "_start");
    String endDateParam = params.get(clientId + "_end");
View Full Code Here

public class ScheduleRenderer extends CoreRenderer implements PartialRenderer {
 
  public void decode(FacesContext facesContext, UIComponent component) {
    Schedule schedule = (Schedule) component;
    ScheduleModel model = (ScheduleModel) schedule.getValue();
    String clientId = schedule.getClientId(facesContext);
    Map<String, String> params = facesContext.getExternalContext().getRequestParameterMap();

    if(params.containsKey(schedule.getClientId(facesContext))) {
      String selectedEventParam = clientId + "_selectedEventId";
      String selectedDateParam = clientId + "_selectedDate";
      String changedEventParam = clientId + "_changedEventId";
     
      //Event select
      if(params.containsKey(selectedEventParam)) {
        String eventId = params.get(selectedEventParam);
        ScheduleEvent selectedEvent = model.getEvent(eventId);
        schedule.queueEvent(new ScheduleEntrySelectEvent(schedule, selectedEvent));
      }
      //Date Select
      else if(params.containsKey(selectedDateParam)) {
        String dateAsString = params.get(selectedDateParam);
        schedule.queueEvent(new DateSelectEvent(component, new Date(Long.valueOf(dateAsString))));
      }
      //Event dragdrop or resize
      else if(params.containsKey(changedEventParam)) {
        String eventId = params.get(changedEventParam);
        ScheduleEvent changedEvent = model.getEvent(eventId);
        int dayDelta = Integer.valueOf(params.get(clientId + "_dayDelta"));
        int minuteDelta = Integer.valueOf(params.get(clientId + "_minuteDelta"));
        Calendar calendar = Calendar.getInstance();
        boolean isResize = params.containsKey(clientId + "_resized");
       
View Full Code Here

  }
 
  public void encodePartially(FacesContext facesContext, UIComponent component) throws IOException {
    Schedule schedule = (Schedule) component;
    String clientId = schedule.getClientId(facesContext);
    ScheduleModel model = (ScheduleModel) schedule.getValue();
    Map<String,String> params = facesContext.getExternalContext().getRequestParameterMap();
   
    String startDateParam = params.get(clientId + "_start");
    String endDateParam = params.get(clientId + "_end");
View Full Code Here

TOP

Related Classes of org.primefaces.model.ScheduleModel

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.