Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMVCMustacheViewEngine and ViewDataset #330

Closed
drcrck opened this issue Feb 19, 2020 · 7 comments
Closed

TMVCMustacheViewEngine and ViewDataset #330

drcrck opened this issue Feb 19, 2020 · 7 comments
Assignees
Milestone

Comments

@drcrck
Copy link

drcrck commented Feb 19, 2020

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

@drcrck
Copy link
Author

drcrck commented Feb 20, 2020

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

@danieleteti
Copy link
Owner

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.

@danieleteti danieleteti added this to the 3.2.0-boron milestone Mar 8, 2020
@danieleteti danieleteti self-assigned this Mar 8, 2020
@drcrck
Copy link
Author

drcrck commented Mar 13, 2020

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

@danieleteti
Copy link
Owner

Can you provide a small self-contained example?

@danieleteti danieleteti reopened this Mar 13, 2020
@danieleteti
Copy link
Owner

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

@drcrck
Copy link
Author

drcrck commented Mar 23, 2020

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

@danieleteti
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants