[DISCUSS] Event edit window/form not hidden on record.commit

Report bugs for any Extensible Components

[DISCUSS] Event edit window/form not hidden on record.commit

Postby r_honey » Wed Mar 16, 2011 5:51 am

It used to happen in 1.0-Beta1 version. When I used to call rec.commit() manually to a new/existing record which was being edited either in EventEditWindow or EventEditForm, the window/form was hidden and the view changed to the last active view. This is no longer the case in 1.0.

Not sure if this is a design decision or a bug, but I use the following code to make it work as earlier:

Code: Select all
    var activeView = calendar.activeView;
    if (activeView.dismissEventEditor) {
        //ActiveView is a CalendarView.
    } else {
        //ActiveView is EventEdit form.
Posts: 62
Joined: Mon Dec 13, 2010 1:37 pm

Re: Event edit window/form is not hidden on record.commit

Postby brian.moeskau » Wed Mar 16, 2011 9:26 am

Yeah, not sure about this. Having the form automatically dismiss on record commit was definitely not a specific feature or documented part of the API. I made lots of changes between the betas and 1.0 final around how records are edited and saved (this is complex due to having to support different store modes like autoSave vs. manual saving along with differences in how stores behave when writers are configured or not). I would say that the current behavior in 1.0 is the correct behavior, unless you find some specific error in how it's working.

I'm curious as to why you need to manually dismiss the edit form from outside of the calendar views, as they normally control that for you?
Personal Blog: Extraneous / Twitter: @bmoeskau / Meetup: Austin Bleeding Edge Web
User avatar
Site Admin
Site Admin
Posts: 1344
Joined: Sat Sep 18, 2010 5:00 pm
Location: Austin, Texas

Re: [DISCUSS] Event edit window/form not hidden on record.co

Postby r_honey » Wed Mar 16, 2011 11:15 am

Yes, I can imagine that would be complex... I have already found and posted my work-around..

I as such do not see any issue with how the code works currently in 1.0 in this regard. I posted it to ensure that it was the intended behavior with respect to what was happening in 1.0-beta1.

Why do I need to dismiss the form outside Calendar Views?? Well, I am not using a Restful Store against the CalendarPanel.
From CalendarPanel's viewpoint, my store is a local store. I handle "add" and "update" events etc. on store to manually update the calendar data to the server. There are multiple good reasons for this, the most prominent being caching of event information to prevent redundant remote load calls.

e.g. when Month view data is fetched from server, I cache it locally in javascript. If you then switch to Day/Week views etc., and the dates fall in the Month view dates that were cached, no request goes out to the server, and data in the store is loaded locally.
As another example, if you view let's say 5 weeks in succession and then switch to Month view, and all the Month's dates have been covered by the 5 weeks' dates, again no request goes out to server and the weeks events are aggregated to be displayed in the month view.

There are other such things I have in place e.g. the ability for the user not to select any Calendar when adding/editing an event. I cannot pass events to CalendarPanel which do not have a cid (calendar id) defined as it generates a series of javascript errors.

I instead massage data before and after its loaded into CalendarPanel to ensure user does not need to select a Calendar and CalendarPanel is also fine with it.
Posts: 62
Joined: Mon Dec 13, 2010 1:37 pm

Re: [DISCUSS] Event edit window/form not hidden on record.co

Postby Tripple26 » Mon Apr 20, 2015 3:17 am

This can be delegated for resolution at a later time.. Maybe the original click event object for the button on the toolbar which triggered View change (and hence datechange) events can be used to track whether datechange has been triggered for this viewchange, just a suggestion...
we are the pioneers in providing esixsigma dumps and tutorials with pass guarantee. University of Connecticut Download our latest testking exeteracuk Best of luck.
Posts: 1
Joined: Mon Apr 20, 2015 3:10 am

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest