danieleteti/delphimvcframework

TMVCMustacheViewEngine and ViewDataset

drcrck opened this issue · 7 comments

Hi,
iI'm trying to use mustache to render a simple dataset, but i notice "TMVCMustacheViewEngine.PrepareModels" doesn't manage ViewDataSet, but only ViewModel.

and more... i don't find any usage of "ViewDataset" in dmvc, is not manage yet?
thanks

workaround is to assign dataset to ViewModel. so ViewDataSet is obsolete?

The only available methods to pass data to the template is to use one of the following indexed properties:

    property ViewData[const aModelName: string]: TObject read GetViewData write SetViewData;
    property ViewDataset[const aDataSetName: string]: TDataSet read GetViewDataset write SetViewDataset;

The other ones are deprecated.

yes, my issue is related to : ViewDataset ;
is managed only in TMVCTemplateProViewEngine not in mustache :)

Can you provide a small self-contained example?

I found the problem you are talking about. Did you tried templatepro engine? Are you starting a new project?

Hi daniele! yes, in templatepro ViewDataset is correctly used.
it's the only unit in all dmvc where is considered :)

Now it should be fixed (all unit tests passes). Let me know if your problem has been fixed.