PDA

View Full Version : Design View and Viewmode Links: Invalid Model name



EricRicher
16 Nov 2017, 10:54 AM
Architect is throwing Framework errors when rendering a view with a viewmodel that has a links config and it is not rendering the view at all.

I define a model, view and a viewModel as follow using Architect:


Ext.define('MyApp.view.FormPanel', {
extend: 'Ext.form.Panel',
alias: 'widget.formpanel',


requires: [
'MyApp.view.FormPanelViewModel'
],


viewModel: {
type: 'formpanel'
},
title: 'My Form'


});

Ext.define('MyApp.view.FormPanelViewModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.formpanel',


links: {
theUser: {
type: 'User',
create: true
}
}


});

Ext.define('MyApp.model.User', {
extend: 'Ext.data.Model',
alias: 'model.user',

requires: [
'Ext.data.field.Field'
],




fields: [
{
name: 'firstname'
},
{
name: 'lastname'
}
]


});


Every time I go to Design View to look at the form, I get the following error in the log and the view is not rendered. This is annoying to me right now as I am using links in many forms and views to download/upload server data. None of them are showing up in the Design view which sorts of defeats the purpose of using Architect as a visual design tool.

However, even if Architect has a issue dealing with links config in viewmodels, the code works perfectly fine and as expected.

57215



I tried setting type to 'MyApp.model.User' , 'model.User' or simply 'user' in the links config and I get the same error.

Here a link to a test Architect archive with the above code.

https://www.dropbox.com/s/fv8vyt5e10w1gyl/LinksTest.xda?dl=0

Here's the version of architect that I am using:



Version:
4.2.2.282




Channel:
4.2-stable




Platform:
1.6.2.49 - win32 x64




Renderer:
56.0.2924.87




Cmd:
6.5.1.240




Framework:
Ext JS 6.5.x Modern






I also tried on Mac with the same results.

bogc
29 Nov 2017, 11:31 PM
Sencha support, is there a workaround for this bug?