Вопрос
Как быстро сгенерировать код страницы для мобильного приложения
Можно использовать для:
- Edit
- Grid
- Preview
Ответ
Выполнять в консоли браузера эмулятора
(new Terrasoft.CodeGeneration.PageCodeGenerator({
modelName: "Contact",
pageType: Terrasoft.PageTypes.Edit
})).generate()В modelName указываем нужный объект
В pageType указываем тип страницы:
pageType: Terrasoft.PageTypes.Grid
pageType: Terrasoft.PageTypes.Edit
pageType: Terrasoft.PageTypes.Preview![]()
В итоге получается:
Terrasoft.LastLoadedPageData = {
controllerName: "Terrasoft.configuration.ContactEditPageController",
viewXClass: "Terrasoft.configuration.ContactEditPageView"
};
Ext.define("Terrasoft.configuration.view.ContactEditPage", {
extend: "Terrasoft.view.BaseEditPage",
alternateClassName: "Terrasoft.configuration.ContactEditPageView",
config: {
id: "ContactEditPage"
}
});
Ext.define("Terrasoft.configuration.controller.ContactEditPage", {
extend: "Terrasoft.controller.BaseEditPage",
alternateClassName: "Terrasoft.configuration.ContactEditPageController",
statics: {
Model: Contact
},
config: {
refs: {
view: "#ContactEditPage"
}
}
});
Показать все комментарии
Войдите или зарегистрируйтесь, что бы комментировать