cancel
Showing results for 
Search instead for 
Did you mean: 

Strategies for Applying Standard Elements to Multiple Screens

Michael K
Senior III

My application has a number of screens. Each display a different set of data and controls, but they all have a standard menu bar, a footer bar, and a keypad which sits off to the side for data entry. I currently use a custom container to house these common elements and I apply this container to each screen.

I've discovered this to be less-than ideal, especially when it comes to communicating between these elements and the Model. For example, the footer shows the power state of a connected device. When the power state changes, the Model notifies the presenters via the Modellistener, and in each of the presenters that have this base custom container I need to propagate the event notification to each view, which in turn propagates the event notification to the custom container, which deals with it accordingly.

What better ways exist to apply standard elements to a number of screens and allow them to subscribe to event notifications from the Model, and easily access Model members similar to presenters?

Embedded UI/UX Consulting: cadenza.design
1 REPLY 1
Alexandre RENOUX
Principal

Hello,

One solution would be to create a BaseView that has the menu bar, footer bar, etc. and all your screens inherits this BaseView. This way, you only need to take care of this BaseView and the changes will be propagated to all the children screens.

This is something that we are aware of and the feature is to be integrated in the Designer hopefully soon.

For the time being, please have a look at the following post : https://community.st.com/s/question/0D53W000003NieGSAS/example-grouping-of-views-with-common-functionality

/Alexandre