글

라벨이 Controller인 게시물 표시

8. SAP UI5 View & Controller Structuring

이미지
  SAP UI5 View & Controller Structuring (구조화)  이 단계에서는 작업 단위의 뷰와 컨트롤러를 모듈화하고 효율적으로 관리할 수 있도록 화면을 재구성한다.  (In this step, the screen is reconstructed so that the View and Controller of the work unit can be modularized and managed efficiently.) 실행 결과 (Results of this step)   이전 단계의 결과와 동일한 UI와 동작을 보여준다. 단, View와 Controller의 구조화를 적용한다.  (It shows the same UI and operation as the result of the previous step. However, the structure of View and Controller is applied.)   실행 순서 (Order of execution of this step): 업무 영역의 화면(View)를 분리하여 신규 생성 및 기존 App.view.xml의 내용을 신규 View로 이동한다. (Separate the screen (View) in the business area to move the contents of the new creation and existing App.view.xml to the new View.) 신규 생성한 View와 한 쌍이 되는 Controller 신규 생성 및 App.controller.js의 내용을 신규 Controller로 이동한다. (Move the contents of the new Controller and App.controller.js, paired with the newly created View, to the new Controller.) App.view.xml에 신규 생성한 View를 Import 한다. (Import a ne...

3. SAP UI5 Controller Create & Module Add

이미지
SAP UI5 Controller Create & Module Add 이전 단계에서는 UI5의 MVC 패턴 중 V(view)에 해당하는 내용을 살펴보았다. 이번 단계에서는 C(Controller)에 해당하는 UI5 동작 적용에 대한 내용을 작성한다. (In the previous step, contents corresponding to V (view) among the MVC patterns of UI5 were examined. In this step, contents for application of UI5 operation corresponding to C (controller) are created.) 실행 결과(Results of this step) 실행 순서(Order of execution of this step): XML view에 버튼 추가 및 Controller를 지정한다. (Add a button and specify a controller in the XML view.) 동작을 제어할 Controller 생성한다. (Create a controller to control the behavior.) 1. XML view에 버튼 추가 및 Controller 지정    (Add a button and specify a controller in the XML view.) webapp/view/App.view.xml에 아래의 노란색 부분 코드를 수정한다. (Modify the yellow partial code below in webapp/view/App.view.xml.)      1 2 3 4 5 6 < mvc:View     controllerName = "ui5_tutorial.controller.App"    xmlns = "sap.m"    xmlns:mvc = "sap.ui.core.mvc" > ...