Application Footer
Now let's walk up to the application level. As we know an application have a main stage in which we have loaded all the times other components. But an application can also have a second stage: The footer.
What are we learning here?
- Enable the footer of an
Application
component - Use the helper class
Buttons
To enable the footer we have to set another property in our defaults which define the appearance of the application panel.
src/apps/demo/layout-component/index.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
From this point on we have an additional stage called footer
in which we can load components.
First we will split the footer into two parts. We use our simple Flexbox
component.
Into the left stage of the footer we load our well known "component basics" toolbar. The buttons
will call the component methods of the application with { target: this }
:
src/apps/demo/layout-component/index.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
We load into the right part of the footer we want to add just a close button. There is a helper
library called Buttons
that provide a very easy method to create standard buttons. We will explain
later some more usefull standard buttons. Our button "close" that we use here call the destroy()
method of the application component.
src/apps/demo/layout-component/index.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
Now you can can show hints, block and load inline applications at the level of the application itself.
Here you see the first time what you may have already guessed: Everything is a component. Thus, almost all functions that exist for a widget are also available to the application.