Package org.richfaces.event

Examples of org.richfaces.event.CurrentDateChangeEvent


    public void setUp() throws Exception {
        super.setUp();
       
        calendar = (UICalendar) application
                .createComponent(UICalendar.COMPONENT_TYPE);
        event1 = new CurrentDateChangeEvent(calendar, "11/2001");
        cal = Calendar.getInstance();
        cal.set(2001, 10, 10);
        event2 = new CurrentDateChangeEvent(calendar, cal.getTime());
        event4 = new CurrentDateChangeEvent(calendar, "");
        event3 = new AjaxEvent(calendar);
    }
View Full Code Here


        .getRequestParameterMap();

    String currentDateString = (String) requestParameterMap.get(clientId + CURRENT_DATE_INPUT);

    if (currentDateString != null) {
      CurrentDateChangeEvent ev = new CurrentDateChangeEvent(component,
          currentDateString);
      ev.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
      ev.queue();

      // TODO nick - nick - queue this event when ValueChangeEvent is
      // queued?
      new AjaxEvent(component).queue();
View Full Code Here

        ajaxContext.setResponseData(getPreload());
      }
    } else {
      if (event instanceof CurrentDateChangeEvent) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        CurrentDateChangeEvent dateChangeEvent = (CurrentDateChangeEvent) event;
        String currentDateString = dateChangeEvent
            .getCurrentDateString();

        if (currentDateString != null) {
          // if currentDateString is not null then event cames from
          // apply request phase
          try {
            // XXX nick - kaa - we should use datePattern
            // attribute-based converter only for selectedDate
            // current date string always has predefined format: m/y
            // review
            // org.richfaces.renderkit.CalendarRendererBase.convertCurrentDate(String)
            // method
            // for more

            // XX nick - kaa - throw exception and review resulting
            // message :)

            Date currentDate = convertCurrentDate(currentDateString);
            CurrentDateChangeEvent newDateChangeEvent = new CurrentDateChangeEvent(
                this, currentDate);
            newDateChangeEvent.queue();
            MethodBinding binding = getCurrentDateChangeListener();

            if (binding != null) {

              binding
View Full Code Here

        ajaxContext.setResponseData(getPreload());
      }
    } else {
      if (event instanceof CurrentDateChangeEvent) {
        FacesContext facesContext = getFacesContext();
        CurrentDateChangeEvent dateChangeEvent = (CurrentDateChangeEvent) event;
        String currentDateString = dateChangeEvent
            .getCurrentDateString();

        // if currentDateString is not null then event cames from
        // apply request phase
        try {
          // XXX nick - kaa - we should use datePattern
          // attribute-based converter only for selectedDate
          // current date string always has predefined format: m/y
          // review
          // org.richfaces.renderkit.CalendarRendererBase.convertCurrentDate(String)
          // method
          // for more

          // XX nick - kaa - throw exception and review resulting
          // message :)

          Date currentDate = getAsDate(getCurrentDate());
          Date submittedCurrentDate = convertCurrentDate(currentDateString);
          dateChangeEvent.setCurrentDate(submittedCurrentDate);

          if (!submittedCurrentDate.equals(currentDate)) {
            updateCurrentDate(facesContext, submittedCurrentDate);
            MethodExpression methodExpression = getCurrentDateChangeListener();
            if (methodExpression != null) {
View Full Code Here

        .getRequestParameterMap();

    String currentDateString = (String) requestParameterMap.get(clientId + CURRENT_DATE_INPUT);

    if (currentDateString != null) {
      CurrentDateChangeEvent ev = new CurrentDateChangeEvent(component,
          currentDateString);
      ev.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
      ev.queue();
    }

    if (requestParameterMap.get(clientId + CURRENT_DATE_PRELOAD) != null) {
      // TODO nick - nick - queue this event when ValueChangeEvent is
      // queued?
View Full Code Here

        + DATE_SCROLL);

    if (currentDateString != null) {
      // ((UICalendar) component)
      // .setCurrentDate(convertCurrentDate(currentDateString));
      CurrentDateChangeEvent ev = new CurrentDateChangeEvent(component,
          currentDateString);
      ev.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
      ev.queue();

      // TODO nick - nick - queue this event when ValueChangeEvent is
      // queued?
      new AjaxEvent(component).queue();
    }
View Full Code Here

      ajaxContext.addRegionsFromComponent(this);
      ajaxContext.setResponseData(getPreload());
    } else {
      if (event instanceof CurrentDateChangeEvent) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        CurrentDateChangeEvent dateChangeEvent = (CurrentDateChangeEvent) event;
        String currentDateString = dateChangeEvent
            .getCurrentDateString();

        if (currentDateString != null) {
          // if currentDateString is not null then event cames from
          // apply request phase
          try {
            // XXX nick - kaa - we should use datePattern
            // attribute-based converter only for selectedDate
            // current date string always has predefined format: m/y
            // review
            // org.richfaces.renderkit.CalendarRendererBase.convertCurrentDate(String)
            // method
            // for more

            //XX nick - kaa - throw exception and review resulting message :)
                     
            Date currentDate = convertCurrentDate(currentDateString);
            CurrentDateChangeEvent newDateChangeEvent = new CurrentDateChangeEvent(
                this, currentDate);
            newDateChangeEvent.queue();
            MethodBinding binding = getCurrentDateChangeListener();
           
            if(binding!=null){
             
               binding.invoke(facesContext, new Object[]{event});
View Full Code Here

        + DATE_SCROLL);

    if (currentDateString != null) {
      // ((UICalendar) component)
      // .setCurrentDate(convertCurrentDate(currentDateString));
      CurrentDateChangeEvent ev = new CurrentDateChangeEvent(component,
          currentDateString);
      ev.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
      ev.queue();

      // TODO nick - nick - queue this event when ValueChangeEvent is
      // queued?
      new AjaxEvent(component).queue();
View Full Code Here

        ajaxContext.setResponseData(getPreload());
      }
    } else {
      if (event instanceof CurrentDateChangeEvent) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        CurrentDateChangeEvent dateChangeEvent = (CurrentDateChangeEvent) event;
        String currentDateString = dateChangeEvent
            .getCurrentDateString();

        if (currentDateString != null) {
          // if currentDateString is not null then event cames from
          // apply request phase
          try {
            // XXX nick - kaa - we should use datePattern
            // attribute-based converter only for selectedDate
            // current date string always has predefined format: m/y
            // review
            // org.richfaces.renderkit.CalendarRendererBase.convertCurrentDate(String)
            // method
            // for more

            // XX nick - kaa - throw exception and review resulting
            // message :)

            Date currentDate = convertCurrentDate(currentDateString);
            CurrentDateChangeEvent newDateChangeEvent = new CurrentDateChangeEvent(
                this, currentDate);
            newDateChangeEvent.queue();
            MethodBinding binding = getCurrentDateChangeListener();

            if (binding != null) {

              binding
View Full Code Here

        Map<String, String> requestParameterMap = context.getExternalContext().getRequestParameterMap();

        String clientId = calendar.getClientId(context);
        String currentDateString = (String) requestParameterMap.get(clientId + CURRENT_DATE_INPUT);
        if (currentDateString != null) {
            calendar.queueEvent(new CurrentDateChangeEvent(calendar, currentDateString));
        }

        String selectedDateString = requestParameterMap.get(clientId + "InputDate");
        if (selectedDateString != null) {
            calendar.setSubmittedValue(selectedDateString);
View Full Code Here

TOP

Related Classes of org.richfaces.event.CurrentDateChangeEvent

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.