Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1332

UISchedule uses event queue for its decoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.7
    • 1.1.8
    • Schedule
    • None

    Description

      org.apache.myfaces.custom.schedule.AbstractScheduleRenderer does most of the decoding for the UISchedule, but then relies on a deferred step (via the Event queue) to finish the job...

      schedule.setSubmittedEntry(entry);
      queueAction = true;

      if (queueAction)
      schedule.queueEvent(new ActionEvent(schedule));

      ...org.apache.myfaces.custom.schedule.UISchedule has a processAction that actually updates the model with the selectedEntry...

      private class ScheduleActionListener implements ActionListener {

      public void processAction(ActionEvent event)
      {
      schedule.getModel().setSelectedEntry(entry);

      I am unclear as to what the need is for this deferred step, but at any rate it is very brittle. If any other ActionListeners get fired before the ScheduleActionListener, they will find the model isn't ready for them yet. This is happening for me using RichFace's jsFunction tag, but it doesn't seem like it would be specific to that.

      Can we move this last step of the decoding into somewhere more appropriate? Ideally in the decode() method itself, but at least as a Listener during the APPLY_REQUEST_VALUES phase? Having it as a listener during the INVOKE_APPLICATION phase, when it could get ordered arbitrarily with respect to other ActionListeners, seems like asking for trouble.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            kennardconsulting Kennard Consulting
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: