Giter Site home page Giter Site logo

vaibhavmojidra / sap-ui5---demo-pages-and-panels Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 79 KB

In SAPUI5, Pages and Panels are UI components used to structure and organize the content of an application.

Home Page: https://vaibhavmojidra.github.io/site/

License: MIT License

JavaScript 42.85% HTML 57.15%
javascript mojidra pages panels sap ui5 vaibhav vaibhav-mojidra vaibhavmojidra

sap-ui5---demo-pages-and-panels's Introduction

SAP UI5 Demo Pages And Panels

In SAPUI5, Pages and Panels are UI components used to structure and organize the content of an application.

We put both the input field and the text inside a containing control called sap/m/Page. The page provides an aggregation to 0..N other controls called content. It also displays the title attribute in a header section on top of the content. The page itself is placed into the pages aggregation of another control called sap/m/App which does the following important things for us:

It writes a bunch of properties into the header of the index.html that are necessary for proper display on mobile devices.

It offers functionality to navigate between pages with animations. We will use this soon.

In order to make the fullscreen height of the view work properly, we add the displayBlock attribute with the value true to the view. The actual content is wrapped inside a Panel control, in order to group related content.

Code Explaination

Refer to /webapp/view/App.view.xml

  • <mvc:View xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" displayBlock="true">: This is the root element of the view. It uses the sap.m library and the sap.ui.core.mvc library for MVC (Model-View-Controller) support. The displayBlock="true" attribute ensures that the view takes up the full screen.

  • <App>: This is a container that holds one or more pages. It's part of the sap.m library.

  • <pages>: This is where you define the pages of your app.

  • <Page title="{i18n>pageTitle}">: This creates a new page with a title. The title is taken from the internationalization model (i18n), which allows for multi-language support.

  • <content>: This is where you define the content of your page.

  • <Panel headerText="{i18n>panelTitle}">: This creates a new panel with a header. The header text is taken from the internationalization model.

  • <VBox class="sapUiSmallMargin">: This creates a vertical layout box (VBox) with a small margin around it. Inside this VBox, there are two controls:

    • <Text text="{/name}"/>: This displays a text element whose value is bound to the /name property of the model.

    • <Input value="{/name}" valueLiveUpdate="true" width="30%">: This creates an input field whose value is also bound to the /name property of the model. The valueLiveUpdate="true" attribute ensures that the model is updated as soon as the user types into the field.


Vaibhav Mojidra - 1.jpeg

Vaibhav Mojidra - 2.gif

Vaibhav Mojidra - 3.jpeg

sap-ui5---demo-pages-and-panels's People

Contributors

vaibhavmojidra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.