Fiori 代码规范2---代码结构详解3

来源:互联网 发布:mysql数据库下载安装 编辑:程序博客网 时间:2024/06/11 05:41

2.3.3    Show/Hide component

For some function, the app need to show or hide component, we have two ways to do

a)    In the view:

i.    Define a JSON model and set the model to view in the controller:



ii.    Bind the model to the view component:

b)    In the controller:

We can set the component visible/editable/enabledby the component id in the controller:

Conventions

  • View names are capitalized
  • All views are stored in the view folder
  • Names of XML views always end with *.view.xml
  • The default XML namespace is sap.m
  • Other XML namespaces use the last part of the SAP namespace as alias (for example, mvc for sap.ui.core.mvc
  • controllerName must be in conformity with the corresponding controller definition

2.3.4    Responsive Layout

Forall SAPUI5 project, we need to promise that the view is responsive(support themultiple screen).

So we’dbetter to use the Grid, FlexBox,FixFlex, SimpleForm, Form in your project.