Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug: Calendar does not redraw events when style changes

    Using last nights nightly build; I think this is a new bug as this was working a few weeks ago.

    When a Databound calendar event comes back from the server with a new value for eventWindowStyle the Calendar widget does not redraw it with the correct style. If I refresh the window or force an invalidateCache then the new style is drawn.

    The simplest reproduction is to modify the databound calendar example and return a different
    eventWindowStyle

    #2
    Not clear this is a new bug, two week old version had same issue.

    Comment


      #3
      hi, atomatom
      I could add events for a single day in the calendar widget. Now I want to add an event starting from today 11:00 pm and extending the same event to tomorrow 10:00 am. How can I add an event like this? Help me plz...........

      Comment


        #4
        A few quick tests aren't showing this behavior for us - can you provide browser details and code that fails or more specific steps to reproduce?

        Comment


          #5
          angelrani: we don't currently support multi-day events

          Comment


            #6
            Hi, isomorphic
            Thanks for your information. I want to customize 12 hour based calendar in which i can set the start day of the week using calendar.setFirstDayOfWeek(1); but i can't change the default time settings (12.00am to 11.00pm) in the left side of the calendar..(for example, i want to set the time starting from 6.00am to 5.00pm).Also same case with 24 hr based calendar.Can anybody help me please...it's very urgent.....
            Last edited by angelrani; 6 Jun 2011, 22:56.

            Comment


              #7
              Yesterday, I saw this on XP/Firefox 3.6. I'm seeing it now on Ubuntu 10.04/Firefox 3.6. I just tried it in Chrome, same thing. Same effect compiled and hosted mode

              Here's a test case, (using the CalendarData sample data from the showcase).

              Move events around, they don't change colour/style.

              Interestingly, if you delete an event (hit the top right X on the event), then the events are redrawn and the style applied.

              Code:
              		Calendar calendar = new Calendar();
              		addMember(calendar);
              		setWidth100();
              		setHeight100();
              
              		calendar.setData(CalendarData.getNewRecords());
              
              		calendar.addEventMovedHandler(new EventMovedHandler() {
              			private String eventWindowStyle = null;
              			private boolean flip;
              			private String style1 = "green";
              			private String style2 = "pink";
              
              			@Override
              			public void onEventMoved(CalendarEventMoved event) {
              				CalendarEvent calendarEvent = event.getEvent();
              				if (flip = !flip) {
              					eventWindowStyle = style1;
              				} else
              					eventWindowStyle = style2;
              				calendarEvent.setEventWindowStyle(eventWindowStyle);
              				calendarEvent.setDescription(eventWindowStyle);
              			}
              		});

              Comment


                #8
                Originally posted by angelrani
                Hi, isomorphic
                Thanks for your information. I want to customize 12 hour based calendar in which i can set the start day of the week using calendar.setFirstDayOfWeek(1); but i can't change the default time settings (12.00am to 11.00pm) in the left side of the calendar..(for example, i want to set the time starting from 6.00am to 5.00pm).Also same case with 24 hr based calendar.Can anybody help me please...it's very urgent.....

                You could try something funky with timezones and using

                Code:
                	calendar.setDateFormatter(dateFormatter)
                I had multi-events working by chopping events up into day slices. Not a pretty solution. I'm not using it like that anymore. You might want to check out other GWT calendar solutions like http://code.google.com/p/gwt-cal/ - unfortunately it has a shitty licence or is expensive for a single component (but then again, hopefully you're paying for the developer to eat and put energy into the project)

                ps, don't jack threads with unrelated questions - start a new one. :)

                Comment


                  #9
                  Timezones won't help, sorry for wild-guess suggestion.

                  Comment


                    #10
                    Styling is automatically updated if you are working with a DataSource and use updateData().

                    Comment


                      #11
                      My real case is using a DataSource. I am not explicitly calling updateData though; doesn't the Calendar use that by default on a drag operation? The thing that seems fishy to me is that the description/title/etc all update but the style does not.

                      I have a hack to fix the current behavior; add an event then delete it. (I think that should work)

                      Comment


                        #12
                        Is this a WONT_FIX or will this be fixed? My test case should work, no?

                        Comment


                          #13
                          Originally posted by Isomorphic View Post
                          Styling is automatically updated if you are working with a DataSource and use updateData().
                          I use a RestDataSource and updateData() and had to force reload data, because in 3.1 LGPL styling isn't updated (checked on FF 16.0.1, Chrome 26.0.1410.43, IE 10.0.9200.16521 - Win7).

                          In this case also CanEditField doesn't work.
                          (I use updateData() to lock event - so locked event has different style and shouldn't be editable)


                          If I use custom form to edit events and then call form.saveData() - this updates styling and canEdit feature !


                          p.s.
                          and, by the way, it would be nice if
                          Calendar.updateData() had DSCallback parameter
                          Last edited by slovekfhu; 8 Apr 2013, 05:58.

                          Comment


                            #14
                            This suggests the return data from your RestDataSource is incorrect in the case where you directly call updateData() - see the FAQ on grids not automatically updating.

                            Comment

                            Working...
                            X