LoadablePanel Control

Hello,
I’ve been trying to user the LoadablePanel contrib control but I get the followng error:

DotVVM.Framework.Controls.DotvvmControlException: Unhandled MissingMethodException occurred in LoadablePanel.Load: Method not found

I’m using the version 4.0.1 and the following code:
Service:

public class LazyLoadingService {
   private readonly TableService _service = new TableService();

   [AllowStaticCommand]
   public async Task<List<OpenTableModel>> LazyLoad(string userId)
   {
       return await _service.LazyLoading(userId);
    }
}

view:

@service service = NameSpace.Services.LazyLoadingService

<dc:LoadablePanel Load="{staticCommand: Data = service.LazyLoad(LoggedInUser).Result}"
                  HideUntilLoaded="false">
    <ContentTemplate>
        Loaded
    </ContentTemplate>
    <ProgressTemplate>
        Loading....
    </ProgressTemplate>
</dc:LoadablePanel>

ViewModel:

public List<OpenTableModel> Data{ get; set; }

I’m following the samples from the github repo.

Are you using the same version of LoadablePanel and DotVVM? I’m not sure which method is missing, so it’s hard to tell what is the issue

Hello,
I’m using Dotvvm 4.1.0 but I’m using Ckeditor v 4.0.1 too and it’s working. Upgrading LoadablePanel to a higher version will make me upgrade dotvvm version too.

I’ve also declared

options.Services.AddScoped<LazyLoadingService>();

In DotvvmStartup.cs code file.

Then you should also use LoadablePanel 4.1. I’m not saying that combining versions will never work, but it’s not supported

Updating to 4.1.0 solved the server issue but now I get a console error:

knockout:3833 Uncaught TypeError: Unable to process binding "if: function(){return dotvvm.isSpaReady }"
Message: Unable to process binding "dotvvm-contrib-LoadablePanel:

I’m probably doing something wrong in the binding but the initial problem is solved, thank you!

Is this the only message in the page? I think there should be more details, like what is the binding expression in the dotvvm-contrib-LoadablePanel

Uncaught (in promise) TypeError: Unable to process binding "if: function(){return dotvvm.isSpaReady }"
Message: Unable to process binding "dotvvm-contrib-LoadablePanel: function(){return { loadBinding:(function(abortSignal){var ar=[].slice.call(arguments);return dotvvm.applyPostbackHandlers(async(options) =>{
	options.viewModel.Test(await dotvvm.staticCommandPostback("q/BxgFO0p9m4SLVo/K5paSt62TcCdS8JZjUy0sfi4l6CyJLotYSitY87UE2pt7pDPL3ZjUmbCjdqh4T5jSFRZGKFmJmUzA6xBKkiykI32WUt6/fnluu94UnsbsbeKWb2LVEmjM8TVO9zBU2hq7rL8mwV2fJJJr0KsMB+GLdz2yWZPzrN8a40068PJO6w7v2W",[],options));},$element,["timeout"],ar,undefined,abortSignal);}),showProgressElement:true} }"
Message: Cannot read properties of null (reading 'style')
    at LoadablePanelHandler.showElement (dotvvm--contrib--LoadablePanel:85:38)
    at LoadablePanelHandler.tryShowProgressElement (dotvvm--contrib--LoadablePanel:62:23)
    at LoadablePanelHandler.reloadPanel (dotvvm--contrib--LoadablePanel:26:19)
    at LoadablePanelHandler.init (dotvvm--contrib--LoadablePanel:14:19)
    at knockout:3810:46
    at Object.ignore (knockout:1618:33)
    at knockout:3809:48
    at Object.arrayForEach (knockout:205:24)
    at applyBindingsToNodeInternal (knockout:3795:22)
    at applyBindingsToNodeAndDescendantsInternal (knockout:3653:44)

This is the full error message in console

Ok sorry, looks like the LoadablePanel is broken and assumes that ProgressTemplate contains exactly one HTML element. Can you try wrapping it in a div to confirm it’s the problem?

1 Like

Yes, it’s working fine after wrapping in a div or using <dot:Literal />. Thank you!