Class ResponsiveGridFrame

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, AjaxableComponent, Arrangeable, Badgeable, Hideable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable

@Component public class ResponsiveGridFrame extends Control implements Arrangeable, Hideable, AjaxableComponent
This class serves as a container for multiple components derivated of the ResponsiveGrid
Each ResponsiveGrid elements added to the mask aligns without considering the alignement of the elements belonging to the objects external to it. Inserting the ResponsiveGrid elements inside a ResponsiveGridFrame the fields of each grid align with each other.
Another important use of ResponsiveGridFrame is to make the grids cloasable. In effect, if one grid is set as closable, it is not possible to close it if it isn't inserted in a ResponsiveGridFrame. The following is an example of use:

 <ResponsiveGridFrame>
     <ResponsiveGrid closeable=”1” label=”Section 1”> 
         <Layout mode="arranging" size=”xl”>
             NAME SURNAME
         </Layout>

         <Input name="AUSENAME" layoutName="NAME" label="Name"/>
         <Input name="AUSESURNAME" layoutName="SURNAME" label="Surname"/>
     </ResponsiveGrid>
     <ResponsiveGrid closeable=”1” label=”Section 2”>
         <Layout mode="arranging" size=”xl”>
             EMAIL EMAIL
         </Layout>

         <Input name="AUSEEMAIL" layoutName="EMAIL" label="Email"/>
     </ResponsiveGrid>
 </ResponsiveGridFrame>
 
Warning: the corresponding size layouts must have the same mode
See Also:
GCApi:
component
  • Field Details

    • RESPONSIVE_GRID_FRAME_WIDGET_STATE_CLASS

      public static final String RESPONSIVE_GRID_FRAME_WIDGET_STATE_CLASS
      See Also:
    • _visible

      protected SetPredicate _visible
    • _fullSize

      protected boolean _fullSize
    • _target

      protected Layout.Target _target
    • _spacing

      protected Layout.Spacing _spacing
    • _layoutXS

      protected Layout _layoutXS
    • _layoutSM

      protected Layout _layoutSM
    • _layoutMD

      protected Layout _layoutMD
    • _layoutLG

      protected Layout _layoutLG
    • _layoutXL

      protected Layout _layoutXL
    • editable

      protected boolean editable
  • Constructor Details

    • ResponsiveGridFrame

      public ResponsiveGridFrame()
  • Method Details

    • setTARGET

      public void setTARGET(String s)
      Indicates whether the layout should be chosen considering the size of the window rather than the workarea. In the first case, the grid will react only after resizing the browser window, while in the second case it will also on the TaskBar open/close.
      Parameters:
      s - String indicates if take into account the work area or the viewport to choose the correct layout. The accepted values ??are:
      • wa: resizing based on the size of the WorkArea (default)
      • vp: resizing based on the size of the ViewPort
    • setSPACING

      public void setSPACING(String s)
      Defines the spacing used between one grid's component and another.
      Parameters:
      s - The accepted values ??are:
      • control: standard spacing to use when components are Control (default)
      • container: increased spacing, to be used when the components are Containers
    • setFULLSIZE

      public void setFULLSIZE(String s)
      Sets the horizontal size of the grid to fullsize. So, when it is sets to true, the width of the grid will occupy all the space possible
      Parameters:
      s - String containing the boolean value to enable fullsize mode or not.
    • setEDITABLE

      public void setEDITABLE(String s)
      Sets if the component is editable or not. If it is editable hovering the upper right corner of the component, the edit icon will be shown and clicking it will be possible to show the configurability panel.
      Parameters:
      s - true or false
    • getFrameHtml

      public org.apache.ecs.Element getFrameHtml(overit.geocall.ux.servlet.processor.Change c, EntitySet es)
      Description copied from interface: AjaxableComponent
      Defines the html part of the element that changes when an Ajax interaction occurs
      Specified by:
      getFrameHtml in interface AjaxableComponent
      Parameters:
      c - The Change object that defines the specific morphing type for the element
      es - The EntitySet to which the element belongs
      Returns:
      The html part of the element that changes when an Ajax interaction occurs
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es)
      Description copied from class: Component
      Abstract method that must be extended and returns the html code of the Component
      Specified by:
      getHtml in class Component
      Parameters:
      es - The EntitySet to which the element belongs
      Returns:
      The html of the Component
    • changed

      public void changed(overit.geocall.ux.servlet.processor.Change c)
      Description copied from interface: AjaxableComponent
      Defines the morphing of the element that occurs when there is an Ajax interaction
      Specified by:
      changed in interface AjaxableComponent
      Parameters:
      c - The Change object that defines the specific morphing type for the element
    • getDefaultChange

      public overit.geocall.ux.servlet.processor.Change getDefaultChange()
      Description copied from interface: AjaxableComponent
      Defines the default Change object for the element
      Specified by:
      getDefaultChange in interface AjaxableComponent
      Returns:
      The default Change object that defines the default morphing type of the element
    • getGenerationHandle

      public Object getGenerationHandle()
      Description copied from interface: Arrangeable
      Returns the object to generate when the Arrangeable element is composed by more than one element
      Specified by:
      getGenerationHandle in interface Arrangeable
      Returns:
      The Object to generate
    • getDescriptionHtml

      public org.apache.ecs.Element getDescriptionHtml(Object generationhandle, EntitySet es)
      Description copied from interface: Arrangeable
      Returns the html code that represents the component description i.e. the formatted label of the field
      Specified by:
      getDescriptionHtml in interface Arrangeable
      Parameters:
      generationhandle - the unique generatin handle
      es - the page entity set
      Returns:
      The html code of the label of the field
    • getContentHtml

      public org.apache.ecs.Element getContentHtml(Object generationhandle, EntitySet es)
      Description copied from interface: Arrangeable
      Returns the html code that represents the active part of the component, i.e. the field and the validation scripts
      Specified by:
      getContentHtml in interface Arrangeable
      Parameters:
      generationhandle - the unique generatin handle
      es - the page entity set
      Returns:
      The html code of the component
    • getHiddenHtml

      public org.apache.ecs.Element getHiddenHtml(Object generationhandle, EntitySet es)
      Description copied from interface: Arrangeable
      Returns the hidden but active html part of an hidden component
      Specified by:
      getHiddenHtml in interface Arrangeable
      Parameters:
      generationhandle - the unique generatin handle
      es - the page entity set
      Returns:
      The html code of the hidden part of the component
    • setVISIBLE

      public void setVISIBLE(String s)
      Description copied from interface: Hideable
      Sets the visibility of the component
      Specified by:
      setVISIBLE in interface Hideable
      Parameters:
      s - String used to defines the visibility of the component
    • getVISIBLE

      public boolean getVISIBLE()
      Specified by:
      getVISIBLE in interface Hideable
      Returns:
      Use Hideable.isVisible()
    • isVisible

      public boolean isVisible()
      Description copied from interface: Hideable
      Checks the visibility of the component
      Specified by:
      isVisible in interface Hideable
      Returns:
      true if the component is visible, false otherwise
    • getLayoutHtml

      protected org.apache.ecs.Element getLayoutHtml(EntitySet es)
    • getGridHtml

      protected org.apache.ecs.Element getGridHtml(EntitySet es)
    • getStartSectionHtml

      protected org.apache.ecs.Element getStartSectionHtml(ResponsiveGrid grid)
    • onOpenClose

      public boolean onOpenClose(UIMessage uim)
      Manages the event of opening or closing a ResponsiveGrid
      Parameters:
      uim - UIMessage containing the ResponsiveGrid
      Returns:
      true
    • getSectionHtml

      protected void getSectionHtml(EntitySet es, org.apache.ecs.html.Div container, ResponsiveGrid rg)
    • getEndSectionHtml

      protected org.apache.ecs.Element getEndSectionHtml(ResponsiveGrid grid)
    • findArea

      protected overit.geocall.basic.ui.control.Layout.Area findArea(Component c)
    • setupLayouts

      protected void setupLayouts()
    • setup

      protected void setup()
      Description copied from class: Component
      Setup the Component
      Overrides:
      setup in class Component
    • reload

      public void reload()
    • getRGChildren

      public Set<Component> getRGChildren()
    • isEditable

      public boolean isEditable()
      Gets if the component is editable or not. If it is editable hovering the upper right corner of the component, the edit icon will be shown and clicking it will be possible to show the configurability panel.
      Returns:
      true if it is editable, false otherwise
    • onShowConfigurabilityPanel

      public boolean onShowConfigurabilityPanel(UIMessage uim)
    • getConfiguredChildren

      public Set<Component> getConfiguredChildren()
    • getUserComponentAttributesMap

      public Map<String,Map<String,Serializable>> getUserComponentAttributesMap()
    • invalidateComponentsAttributeMap

      public void invalidateComponentsAttributeMap()
      Invalidates the map that contains all the user's component customization and force it to be reloaded.
    • buildDisplayScript

      public void buildDisplayScript(StringBuilder sb)
      Description copied from class: Component
      Every component can add a script to the StringBuilder, script executed when the component is displayed.
      Overrides:
      buildDisplayScript in class Component
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • buildSetupScript

      public void buildSetupScript(StringBuilder sb)
      Description copied from class: Component
      Every component can add a script to the StringBuilder, script executed when the component is created.
      Overrides:
      buildSetupScript in class Component
      Parameters:
      sb - The StringBuilder on which we want to add the script