Class BaseSearchContainer<T extends DynO>

Type Parameters:
T - the generic type
All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable
Direct Known Subclasses:
CapacityPlanningScenarioSearch, ExpectedMaterialDetail, ImportOperationActivityFromWo, LogMaster, PermitHistory, PermitsForSingleIntervention, ResourceForecastHeaderSearch, RoughPlanningActivities, RoughPlanningSearch, SearchActivityForecastHeader, SearchAgendaHistory, SearchBundle, SearchCrewShell, SearchCrewShellModel, SearchDailyPlanOrderConfiguration, SearchForecastActivityPriority, SearchForecastGroupingConstraint, SearchForecastShiftModel, SearchImmediateSchedulingActivities, SearchMaterial, SearchSchedulingProposal, SearchStock, SearchTechnicalObjectType, SearchTooltipConfiguration, SearchTransferRequest, SearchWarehouse, SearchWarehouseMaterial, SearchWarehouseOperation, SearchWorkOrderType, SelectMaterial, SelectTransferRequest, SelectWarehouse, StockDetail, StockHistory

public abstract class BaseSearchContainer<T extends DynO> extends Container
Base container for search pages.
Since:
19.0
See Also:
GCApi:
controller
  • Field Details

    • searchPanel

      protected Panel searchPanel
    • searchForm

      protected Form searchForm
    • resultTable

      protected EventServerTableView<T extends DynO> resultTable
    • openObject

      protected transient Object openObject
    • searchFilter

      protected Map<String,Object> searchFilter
    • currentRow

      protected int currentRow
    • dateRangePresets

      protected transient DateRangePresets dateRangePresets
  • Constructor Details

    • BaseSearchContainer

      public BaseSearchContainer()
  • Method Details

    • onOpen

      public void onOpen(Object o)
      Description copied from class: Container
      Method called when is executed the WindowManager.push(overit.geocall.basic.ui.Window, java.lang.Object) of the Window that contains the Container. It calls the onOpen(o) method of all the Container's childrens.
      If a page is opened through the process of a route, it is possible that the route was called with params to pass to the page.
      The route params could be passed specifying them like query string's param on the url, using commas or the '=' character, to separate the keys and the values. Valid syntaxs are: "&params=KEY1,VAL1,KEY2,VAL2" or "&params=KEY1=VAL1,KEY2=VAL2"
      In that case it is possible to retrieve those params via the WindowManager.getRouteParams() method that returns an HashGetter with the params passed as parameters.
      For example it's possible to retrieve and use the params in this way: HashGetter hg = getWM().getRouteParams();
      String val1 = hg.getString("key1",null);
      String val2 = hg.getString("key2",null);
      Overrides:
      onOpen in class Container
      Parameters:
      o - Object received from the caller
    • setupWindow

      protected abstract void setupWindow()
      Defines the initial page aspect setting the visibility field in the search form and launches the main search.
    • onQuery

      public boolean onQuery(UIMessage uim)
      Main event for search action. It retrieves the search params from the uim and hide the search panel.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • search

      protected void search(Map<String,Object> formValues)
      Executes the search.
      Parameters:
      formValues - the form values
    • getFilterParams

      protected Map<String,Object> getFilterParams(Map<String,Object> formValues)
      Returns the map used for generate the filter object.
      Parameters:
      formValues - the search form values map
      Returns:
      a map used for generate the filter object
    • onRowClick

      public boolean onRowClick(UIMessage uim)
      Event launched when a user clicks on a table row. It opens a panel with the entity details, evaluating if can be edited or not.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • isEditingEnabled

      protected boolean isEditingEnabled()
      Defines if the selected entity is editable or not.
      Returns:
      true, if is editing enabled
    • onRowMenu

      public boolean onRowMenu(UIMessage uim)
      Event launched when a user clicks on a table row menu button.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • addRowMenuItems

      protected void addRowMenuItems(Menu menu)
      Method used to manage the result table row menu items.
      Parameters:
      menu - the menu displayed
    • onEdit

      public boolean onEdit(UIMessage uim)
      Event launched to edit the main entity.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onView

      public boolean onView(UIMessage uim)
      Event launched to view the main entity.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • getSelectedObject

      protected T getSelectedObject()
      Returns the selected object.
      Returns:
      the selected object
    • onNew

      public boolean onNew(UIMessage uim)
      Event used to open a new page for new entity creation.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onShowSearchPanel

      public boolean onShowSearchPanel(UIMessage uim)
      Event used to show the search panel.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onHideSearchPanel

      public boolean onHideSearchPanel(UIMessage uim)
      Event used to hide the search panel.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • dateRangesPresets

      protected DateRangePresets dateRangesPresets()
      Gets the date preset manager.
      Returns:
      the date range presets
    • onShowDatePresets

      public boolean onShowDatePresets(UIMessage uim)
      Shows the pop-up menu with the data preset values.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onClearDatePresets

      public boolean onClearDatePresets(UIMessage uim)
      Clears the value of the selected Date field.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onApplyPreset

      public boolean onApplyPreset(UIMessage uim)
      Applies the preset date range to a date filter.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onRefresh

      public boolean onRefresh(UIMessage uim)
      Event for refresh the result table.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onRefreshRow

      public boolean onRefreshRow(Object o)
      Event for refresh the current table row. It is usually called on page restore.
      Parameters:
      o - the object received by the event
      Returns:
      true to break the responsibility chain, false otherwise.
    • refresh

      protected void refresh()
      Refreshes the search table.
    • refreshCurrentTableRow

      protected void refreshCurrentTableRow()
      Refreshes the current table row.
    • onTableMenu

      public boolean onTableMenu(UIMessage uim)
      UI event handler to show the table menu.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • addTableMenuItems

      protected void addTableMenuItems(Menu menu)
      Method for manage the result table menu items.
      Parameters:
      menu - the menu displayed
    • onFilterTab

      public boolean onFilterTab(UIMessage uim)
      UI event handler to show the filter tab.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • showFilterPanel

      protected void showFilterPanel()
      Manages the visibility of the filter panel.