Announcement

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

    when loading Menu dynamically from the DataSource, Pagination not working

    when loading Menu dynamically from the DataSource, Pagination not working.

    please find the properties set on Menu

    Code:
    Menu.setDataSource(ListDS.getInstance());
    Menu.setDataFetchMode(FetchMode.PAGED);
    Menu.setDataPageSize(30);
    Menu.setShowAllRecords(false);
    Menu.setShowIcons(true);
    Also the find the DSRequest snapshot inside transformRequest() of DataSource

    Code:
    In DSRequest not able to 
    
    {
        "operationType":"fetch", 
        "dataSource":"isc_ListDS_0", 
        "data":null, 
        "callback":{
            "caller":{
            }, 
            "methodName":"flatDataLoaded"
        }, 
        "requestId":"isc_ListDS_0$62716", 
        "bypassCache":true, 
        "showPrompt":true, 
        "$376":'$$BACKREF$$:.operationType.dataSource.data.callback', 
        "originalData":null, 
        "unconvertedDSRequest":{
            "operationType":"fetch", 
            "dataSource":"isc_ListDS_0", 
            "data":null, 
            "callback":'$$BACKREF$$:.operationType.dataSource.data.callback', 
            "requestId":"isc_ListDS_0$62716", 
            "bypassCache":true, 
            "showPrompt":true, 
            "$376":'$$BACKREF$$:.operationType.dataSource.data.callback', 
            "originalData":null
        }
    }
    We could not find properties related to paging (startRow, endRow, "dataFetchMode":"paged" )in DSRequest.

    Please let us know if any other property need to be set for enabling paging in Menu

    #2
    Menus do not support paginated display, all data must be loaded at once. That's why it does not pass startRow/endRow to the server.

    It's very strange to have a menu that has load on demand, and that would generally be very, very awkward for end users. But if you need such a thing, just use a ListGrid and style it so it looks something like a menu.

    Comment


      #3
      Originally posted by Isomorphic View Post
      It's very strange to have a menu that has load on demand, and that would generally be very, very awkward for end users. But if you need such a thing, just use a ListGrid and style it so it looks something like a menu.
      Not that strange. I've done exactly the same thing: the server tells the client what features are enabled for the currently logged in user, and the menus are built dynamically based on that, plus application state, etc.

      I used a styled TreeGrid.

      Comment


        #4
        Again, what's strange is not a menu *dynamically retrieved from the server*, that's quite common. What's strange is a "menu" that's so large it's needs pagination ("load on demand") to handle the number of menu items. That implies thousands of menu items; very awkward.

        Comment

        Working...
        X