User Guide
  • Introduction
  • Overview
    • About 4WS.Platform
      • Architecture
      • Enterprise Edition
      • Tech specs and requirements
      • Warp SDK
    • Creating a web application
  • Core features
    • Tables
    • SqlTool
    • Definition of Data models and Relations
      • Relations
      • Reverse Engineering
      • Custom Fields
    • Defining business components
      • What are business components
      • Business components to fill-in panels
      • Creating business components
        • By a datastore entity
        • By a MongoDB collection
      • Defining Custom Java Business component
    • Defining the UI
      • App Designer
        • App Designer Menu
        • Definition of additional data sources
        • Panel containers and layouts
          • Tab panel
          • Alternative panel
          • Accordion panel
          • Vertical orientation panel
          • Horizontal orientation panel
          • Columns panel
          • Table panel
          • Generic panel
          • Responsive panel
        • Window content
          • Grid Panel
          • Form Panel
          • Filter Panel
          • Tree Panel
          • Google Map Panel
          • Preview Panel (old Image panel)
          • Tree + Grid Panel
          • Image Gallery
        • Windows list
        • Panel definition
          • Columns properties
          • Controls properties
          • Filter properties
          • Supported components
        • Variables
        • Code selectors
          • When not to use a dynamic combo-box
        • Smart Filter and Advanced Filter
        • Multi Value Combobox Filter
        • Multi Value Tree Filter
        • Buttons
        • Translations
          • Translations about GUI components and internationalization settings
          • Data coming from database
          • Custom code and translations
        • Application Menu
        • Bulk import binded to a grid
        • Range Date Filter
      • Web Interpreter
        • Grid components
        • Detail forms
        • Other components
        • Other features
          • Chat
        • Global variables
          • Client-side global variables
          • Server global variables
        • Forgot Password
    • Working with users and roles
      • Rule for roles
      • Permissions Administrator
    • Wizard
      • How to add a checkbox grid to select one or more rows
      • How to load a second grid when clicking on a row from the first grid
      • How to load a form when clicking on a row of the grid
      • How to open a window when double clicking on a row of the grid
      • How to open a window with right click on the popup menu
      • How to open a window when pressing a button on the grid toolbar
      • How to load a grid after loading a form
      • How to open a window when pressing a button on the form toolbar
      • How to load a grid when clicking on a tree node
      • How to load a form when clicking on a tree node
    • Defining events
      • Panel events
      • Column events
      • Control events
      • Filter events
      • Timer events
      • Start-End event
    • Server-side Javascript & Web Service
      • Server-side Javascript
      • Grid component filled by a server-side JS
      • Detail component filled by a server-side JS
      • How to define a server-side JavaScript action
      • Web service
  • Setting up the environment
    • How to install
    • Application parameters
    • Global parameters
  • Modules
    • Reports & Charts
      • Jasper Report + iReport
      • Online report
      • Docx templating
      • Charts
      • Pivot Grid
      • Multidimensional pivot grid
      • Data Export from SQL query
    • SSO
      • Identity management in Platform
        • Identity management on the internal Platform database
        • Identity management based on Google SSO
      • LDAP
        • LDAP support
        • Identity management based on LDAP and database
        • Identity management based on an embedded LDAP server used by Alfresco and or Activiti
        • Identity management based on a remote LDAP server to connect to Platform on the cloud
        • Connecting an LDAP server to Activiti BPM
        • Connecting an LDAP server to Alfresco ECM
      • Google SSO
        • Google SSO
        • Google OAuth2
        • Identity management based on Google SSO
      • Custom SSO
      • Firebase
    • Mobile
      • Mobile introduction
      • Offline vs Online
        • Server side features
        • Server side functionalities
        • Server side Platform features
        • Mobile app features
      • Mobile side specifics
        • Customizations
          • Custom theme editor
        • App Menu
        • Window content
          • Detail scrollable form
          • Scrollable paginated grid
          • Constraint layout
          • Constraint panel
          • Collection grid view
          • Preview panel (mobile)
        • Form Controls
      • Reference guide
      • Cleaning up data
      • How to
      • App deployment
        • App deployment for the iOS platform
        • App deployment for the Android platform
      • Style properties
      • Appendix : Synchronization flow
      • Translations
    • GSuite
      • Introduction
      • Client-side integration
      • GMail
      • Calendar
      • Drive
      • Contacts
    • Google Cloud Platform
      • Datastore
        • Google Datastore Introduction
        • How to create Datastore entities
      • Google Cloud Storage
    • Scheduler
      • Scheduler Introduction
      • Process settings
        • How to define a sequence of consecutive processes
        • How to define a Custom Java Business component
        • How to define a Grid Data Import
        • How to define a server-side Javascript action
      • Email notifications
      • Process executions
      • Manually start a scheduled process
      • Process input parameters
    • Queue Manager
    • Log & Analysis
      • Application Log
      • Log statistics
      • App analyzer
      • Table log
      • Threads
      • Sessions and heap memory
      • Heap memory analysis
      • Access Log
      • Datastore statistics
      • Total monthly costs with Google Datastore
      • Service Monitoring
        • Introduction
        • Defining a service to monitor
        • Notifications setup
        • Events automatically managed by Platform
        • Remote Platform servers
        • Knowledge base
        • Adding log programatically
        • Searching for logged data
        • Use cases
    • File Management
    • Export and Import of Metadata
      • Application Metadata Management
    • Trigger writing operations
    • Audit
    • BPM
      • BPMN Introduction
      • BPMN main parts
      • Activiti Setup
      • Platform integration
        • Processes
        • Models
        • Process instances
        • To-do list
        • Process history
      • Process Web Modeler
        • Model Creation
          • Start-End Event
          • Gateways
        • Supported objects
        • Start tasks and user tasks
        • Form properties
          • Important notes
          • Property types
        • Service tasks
          • Web service
          • SQL Query
          • SQL statement
        • Mail task
        • Script task
          • Example : how to get a value previously read from a SQL query
          • Example : how to get the current process instance id
        • Timer events
        • Subprocess and Call Activiti
      • Utility methods available in Platform
        • How to start a process from a JavaScript action
        • How to complete a user task from a JavaScript action
      • An example
        • Processes
        • Instances
        • Activities
        • History
    • Embedded CMS
    • ECM
      • Alfresco
        • Alfresco Introduction
        • Integration between 4WS.Platform and Alfresco
          • Integration at GUI level
          • Integration at model level
          • Integration at authentication and authorizations level
          • Additional features
        • How to use 4WS.Platform and Alfresco together
          • Set the same Identity Management system
          • Define document types and aspects in Alfresco
          • Import the document types and aspects definitions in 4WS.Platform
          • Define document types and aspects in 4WS.Platform
          • Reverse engineering of document types or aspects
          • Definition of business components to fill-in panels
          • Definition of the GUI
          • Additional server-side services
        • Requirements
        • Current limits in 4WS.Platform - Alfresco integration
      • Archiflow
        • Setup
        • Archiflow artifacts
        • How to
    • Lotus Notes Migration Tool
    • NoSQL databases
      • MongoDB
        • MongoDB Introduction
        • Setting up the environment
        • How to create collections
        • How to create business components
        • How to create windows filled with data coming from MongoDB collections
        • Design rules
      • Google Datastore
        • Google Datastore Introduction
        • Setting up the environment
        • How to create entities
        • How to create business components
        • How to create windows filled with data coming from Datastore entities
        • Design rules
    • TensorFlow
    • Web Page Development
      • Pure Web Page Development
      • Google Material Design development
      • Appendix A - a complete example without any lib
      • Appendix B - a complete example with Google MD
    • Jira Integration
    • Platform for GAE
    • SQL errors management
    • Multidimensional pivot grid
    • Quality
      • Automated Web Service Testing
      • Automated unit testing
      • Source code static analysis using ESlint
      • Source code static analysis using SonarQube
  • Troubleshootings
  • Best practises
    • Database design
    • Database maintenance
    • Creating a Web app : common use cases
    • Creating a mobile app : common use cases
Powered by GitBook
On this page

Was this helpful?

  1. Core features
  2. Defining the UI
  3. App Designer
  4. Panel containers and layouts

Responsive panel

PreviousGeneric panelNextWindow content

Last updated 3 years ago

Was this helpful?

Responsive panel

This kind of layout makes a form/filter panel content dynamically rendered on a variety of devices and windows having different screen sizes.

In order to set this layout, you have to change the default layout defined at panel level; if not specified, it is "absolute layout". To activate the responsive layout, set it in the "layout" combobox control.

A form/filter panel having this layout adapts the content to the viewing environment, so that when there is not enough horizontal space to host all controls designed to be in the same row, these are re-arranged on the next lines. It means that a vertical scrolling can be needed, when there is not enough horizontal space and controls are arranged on multiple lines.

This layout is based on the definition of

  • a predefined number of columns (field “Columns number”), defined at panel level

  • for each control to show, a few mandatory properties must be defined:

    • an Height

    • the minimum width is equals Width

    • a maximun Width (field named “Max Width”)

    • the percentage occupied by the control (field named “% Occuped”) with respect to the number of columns; in the example below, the first line contains 3 controls having the same length: 1/3 (to be more precise: 33%+33%+33%), whereas the second line contains only 2 control, where the first is 33% and the second 66%

  • Controls under label (above the control, on the left of it)

Example with 3 pre-defined columns and no maxWidth set, except for “Sex”:

Starting from these settings (where N is the default number of columns per row), the content of the panel is arranged: when there is not enough space (in horizontal) to maintain N controls in the same row, the last ones are moved to the next line and so on.

Arrangement is carried out by evaluating the min/max width for each control and comparing them with the current available space (current panel width) and according to it, they are moved to the next lines if there is not enough space of N controls for each row.

Example with 3 default columns for row, but available space only for 2 columns:

As soon as the available horizontal space is reduced, controls are arranged until they reach the minimum number of columns: 1

Example:

Optional settings for each control are:

  • Max Width; if not set, a control will be stretched to all the available space, so that no empty space is left on the panel (on the right); if set, this value represents the max width for the control: helpful especially for input controls which should be rendered with a small width, like age, sex, etc.

An alternative approach involves the definition of an optional setting at panel level:

  • Max Width of a panel; if set, the specified columns (N) will occupy no more than the specified width: this solution is good for windows designed for a specific resolution (e.g. 1024x… pixels), but has the drawback of let an empty space on the right (not good for displays having a larger resolution)

When the max width for the panel is set, a “larger than needed” panel would be rendered as follows:

As long as the available space is reduced, a smaller number of columns will be used and consequently controls will be re-arranged:

Finally, as for the first scenario, 1 only column will be used:

Bad & Good practices

Here it is a list of things no to do when configuring a form/filter panel

Do not set invalid percentages for controls

Bear in mind that the total percentage of control widths for a line must never be more than 100%.

When you have a row having 3 controls with same width, you have to set the percentage with a value like: 33% + 33% + 33%

A wrong configuration would be: 33% + 33% + 34%

Theoricaly, the latter choice would be better, since the total percentage is exactly 100%, but this can lead to an unaesthetic rendering of the controls when there is not enough space for all of them: in such a case, there would be a control a bit larger than the others (34%) rendered on the next column; consequently, it would be better to maintain always the same percentage, rather than rounding one of them to fit a 100%.

Another common mistake is setting percentages of 33+33+33 for a row and 100% for another row (when a control should occupy all available space). The right percentage for the latter is 99%

Do not arrange controls with a large number of columns

Pay attention to the number of columns you set for a panel: 1,2,3,4 seem to be good numbers, not only because they arrange a small number of controls over a line, but also because they allow to define percentages for controls easy to define:

1 column: 100%

2 columns: 50% + 50%

3 columns: 33% + 33% + 33%

4 columns: 25% + 25% + 25% + 25%

This is not true for larger number of columns, so avoid to use a large number of columns or a number of columns not easy to divide by.

Do not set max width for every control

If you set a min=max width for each control, controls are bounded to an exact width and this can lead to empty spaces among them, especially in case of a form/filter panel where a max width has not been set.

A better choice would be to classify controls in two groups:

  • controls which should have a fixed width, as for controls representing gender, ag (i.e. width a small number of digits to type in); these controls can have a fixed width, so they are aesthetically good to see

  • controls containing large descriptions, as for corporate name, address, etc., where it would be better to let them stretch to all available space

Do not arrange controls randomly

Pay attention to the position when you arrange controls, especially for the ones having a different percentage with respect to the others.

Let’s take this example, where there are 3 columns and controls have 33% width each, except for the address, which contains a large description and hence is set with a 66% width. The position for the last control can make the difference. Look at this (wrong) arrangement:

name            surname                city
                address                zip code        

If this panel were resized to a smaller width so that only 2 columns can be showed, the responsive layout would re-arrange it in this way:

name            surname                
city            SPACE NOT USED
                address                
zip code        SPACE NOT USED        

which is aesthetically not good, because there are empty spaces and it occupies 4 lines, instead of 3, which could lead to vertically scroll the screen to show part of it.

A better choice would have been:

name            surname                city            
                zip code               address        

When this panel is resized to a smaller width so that only 2 columns can be showed, the responsive layout would re-arrange it in this way:

name            surname                
city            zip code
                address                        

This is clearly a better choice, since it only requires 3 lines to render the whole content and there are not empty spaces among the controls.