Announcement

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

    #16
    Hello, my full use case is closer to the following:

    Code:
    isc.Calendar.create({
        ID: "aCalendar",
        width: "100%",
        height: "100%",
        autoFetchData: false,
        dataSource: "supplyItem",
        autoDraw: false,
        currentViewName: "month",
        startDateField: "nextShipment",
        implicitCriteria: {
            _constructor: "AdvancedCriteria",
            operator: "and",
            criteria: [{fieldName: "nextShipment", operator: "notNull"}]
        }
    });
    
    isc.AdaptiveMenu.create({
        ID: "adaptiveMenu",
        menuButtonTitle: "More...",
        align: "center",
        defaultLayoutAlign: "center",
        items: [
            {
                title: "Foo Bar",
                icon: "Edit"
            },
            {
                title: "Foo Bar",
                icon: "Edit"
            },
            {
                title: "Foo Bar",
                icon: "Edit"
            },
            {
                title: "Foo Bar ",
                icon: "Edit"
            }
        ]
    });
    
    isc.ToolStrip.create({
        ID: "aToolStrip",
        // height: 32,
        width: "100%",
        layoutMargin: 0,
        defaultLayoutAlign: "center",
        members: [
            adaptiveMenu
        ]
    });
    
    isc.VLayout.create({
        ID: "aVLayout",
        visibility: "hidden",
        border: "2px solid blue",
        width: "100%",
        height: "100%",
        members: [
            aCalendar,
            aToolStrip
        ],
        autoDraw: false
    })
    
    isc.HLayout.create({
        ID: "aHLayout",
        border: "2px solid red",
        width: "100%",
        height: "100%",
        backgroundColor: "white",
        members: [aVLayout]
    })
    (where aHLayout contains multiple layouts, but only one is visible at a time)

    Then, if you call:

    Code:
    aCalendar.fetchData();
    aVLayout.animateShow();
    the fetch is not executed.

    Comment


      #17
      Thanks Claudio - just confirming, we do see the issue and have a fix ready. However, while adding new autotests for these reports, we see some minor differences across different views and will be addressing those in the next day or two. We'll update here when the changes hit builds.

      Comment


        #18
        hi Claudio - this one has been fixed - we added a whole raft of new autotests for data-fetching in all CalendarViews - you should find things more solid as of tomorrow's builds, those dated May 19 or later.

        Comment


          #19
          SmartClient Version: v13.1p_2025-05-19/Enterprise Deployment (built 2025-05-19)

          Hello, I can confirm it's working now, thank you very much!

          Comment


            #20
            Hi, I celebrated too soon - I just realized there's still an issue.
            If the calendar is initially set with currentViewName: "day" or "week", after the first fetch, switching to the month view doesn't display any events.

            Comment


              #21
              hi Claudio - just confirming, we do see this issue - it's been fixed among regular CalendarViews but some tweaks are needed for Timelines, which currently use a range-criteria mechanism that predates the recent implementation for the other views.

              We'll update here shortly, once those Timeline tweaks are in and new autotests have been added for these latest changes.

              Comment


                #22
                hi Claudio - a number of additional tweaks have been made and associated autotests added - please retest with a build dated May 25 or later.
                Last edited by Isomorphic; 23 May 2025, 22:57.

                Comment


                  #23
                  SmartClient Version: v13.1p_2025-05-25/Enterprise Deployment (built 2025-05-25)

                  I can confirm it's working now, thank you very much

                  Comment


                    #24
                    Originally posted by Isomorphic View Post
                    Note that, if you do want your custom criteria to be included in the autoFetchData fetch, you can override calendar.adjustCriteria(defaultCrit).
                    Hi, I’d like to ask for a clarification: I noticed that when I call Calendar.fetchData(customCriteria), the fetch is performed, but the customCriteria is ignored.
                    Is this the expected behavior?

                    If so, does it mean that using Calendar.adjustCriteria() is mandatory?
                    If that's the case, it's currently not mentioned in the documentation.

                    Also, is Calendar.fetchData() actually intended to work the same way as it does for grids?
                    In the previous test case, if I attach a callback to fetchData(), it doesn’t get triggered - unless I call animateShow() before fetchData().

                    Comment


                      #25
                      hi Claudio,

                      The issue with custom criteria and with the callback was that, when the fetch was delayed due to not being drawn, the parameters from your original call weren't being cached.

                      We've fixed that for tomorrow's builds.

                      Calendar.adjustCriteria() isn't mandatory - it's just a convenience, more so that you can inspect and modify the auto-generated range-dates.

                      Comment


                        #26
                        Thank you for the quick reply. I just tried calling Calendar.fetchData(customCriteria) with the Calendar already visible, and I can see that the customCriteria is added to the date range criteria.
                        However, when I move to a different month, I notice that in the fetch for the new date range, my customCriteria is no longer present.

                        Comment


                          #27
                          hi Claudio,

                          We've made some more improvements here - parameters passed to fetchData() before draw are no longer discarded, so your callback will fire and your criteria will be applied, and subsequent automatic fetches, as a result of navigating or changing Views, will retain your criteria, correctly appending the calculated range-criteria to yours. You can also now call setCriteria() before draw() rather than fetchData(), if you prefer, and the implicitCriteria subsystem should also be working.

                          We've added some more autotests, and you can try out the fixes in tomorrow's builds, dated May 28.

                          Comment


                            #28
                            SmartClient Version: v13.1p_2025-05-29/Enterprise Deployment (built 2025-05-29)

                            Hello, with the latest build everything seems fine, thank you very much

                            Comment

                            Working...
                            X