Class MetaTab

java.lang.Object
org.openxava.tab.meta.MetaTab
All Implemented Interfaces:
Serializable, Cloneable

public class MetaTab extends Object implements Serializable, Cloneable
Author:
Javier Paniza
See Also:
  • Constructor Details

    • MetaTab

      public MetaTab()
  • Method Details

    • getTitleI18n

      public static String getTitleI18n(Locale locale, String modelName, String tabName)
      Throws:
      XavaException
    • getMetaModel

      public MetaModel getMetaModel()
      Throws:
      XavaException
    • setMetaModel

      public void setMetaModel(MetaModel metaModel)
    • createDefault

      public static MetaTab createDefault(MetaComponent component)
      Throws:
      XavaException
    • createDefault

      public static MetaTab createDefault(MetaModel metaModel)
    • getMetaProperties

      public List<MetaProperty> getMetaProperties()
      Returns:
      Not null, read only and of type MetaProperty.
      Throws:
      XavaException
    • buildFilterConditionForContent

      public String buildFilterConditionForContent(String content, Collection<String> propertiesToUse)
      Builds a condition to filter rows by textual content across one or more properties, reusing the same semantics as Tab.filterByContentInAnyProperty.
      Parameters:
      content - Text entered by the user
      propertiesToUse - Qualified property names to include in the filter; if null, all non-calculated visible properties of the tab are used
      Throws:
      XavaException
      Since:
      7.6.3
    • buildFilterConditionForContent

      public String buildFilterConditionForContent(String content)
      Convenience overload that filters using all non-calculated visible properties of this tab.
      Throws:
      XavaException
      Since:
      7.6.3
    • getMetaPropertiesHidden

      public Collection<MetaProperty> getMetaPropertiesHidden()
      Throws:
      XavaException
    • namesToMetaProperties

      public List<MetaProperty> namesToMetaProperties(Collection<String> names)
      Throws:
      XavaException
    • getMetaPropertiesCalculated

      public Collection<MetaProperty> getMetaPropertiesCalculated()
      Hidden ones are not included
      Returns:
      Not null, read only and of type MetaProperty.
      Throws:
      XavaException
    • getMetaPropertiesHiddenCalculated

      public Collection<MetaProperty> getMetaPropertiesHiddenCalculated()
      Returns:
      Not null, read only and of type MetaProperty.
      Throws:
      XavaException
    • hasCalculatedProperties

      public boolean hasCalculatedProperties()
      Throws:
      XavaException
    • getTableColumns

      public Collection getTableColumns()
      Returns:
      Not null, read only and of type String.
      Throws:
      XavaException
    • getHiddenTableColumns

      public Collection<String> getHiddenTableColumns()
      Returns:
      Not null, read only and of type String.
      Throws:
      XavaException
    • getPropertiesNames

      public List<String> getPropertiesNames()
      Returns:
      Not null, read only of type String.
      Throws:
      XavaException
    • getPropertiesNamesWithKeyAndHidden

      public List<String> getPropertiesNamesWithKeyAndHidden()
      Throws:
      XavaException
    • getHiddenPropertiesNames

      public List<String> getHiddenPropertiesNames()
      Names of properties that must to exist but is not needed show they to users.

      Usually are properties used to calculate others.
      The keys are excluded.

      Returns:
      Not null, read only and of type String.
      Throws:
      XavaException
    • setDefaultPropertiesNames

      public void setDefaultPropertiesNames(String properties)
    • setPropertiesNames

      public void setPropertiesNames(String properties)
      Comma separated.
    • getSelect

      public String getSelect()
      Throws:
      XavaException
    • getCmpFieldsColumnsInMultipleProperties

      public Collection<String> getCmpFieldsColumnsInMultipleProperties()
      Throws:
      XavaException
    • getMetaComponent

      public MetaComponent getMetaComponent()
    • setMetaComponent

      public void setMetaComponent(MetaComponent component)
    • isExcludeByKey

      public boolean isExcludeByKey()
    • isExcludeAll

      public boolean isExcludeAll()
    • setExcludeByKey

      public void setExcludeByKey(boolean excludeByKey)
    • setExcludeAll

      public void setExcludeAll(boolean excludeAll)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getMetaFilter

      public MetaFilter getMetaFilter()
    • setMetaFilter

      public void setMetaFilter(MetaFilter metaFilter)
    • hasFilter

      public boolean hasFilter()
    • addMetaProperty

      public void addMetaProperty(MetaProperty metaProperty)
    • addProperty

      public void addProperty(String propertyName)
      For dynamically add properties to this tab
    • addProperty

      public void addProperty(int index, String propertyName)
      For dynamically add properties to this tab
    • removeProperty

      public void removeProperty(String propertyName)
      For dynamically remove properties to this tab
    • dropMember

      public void dropMember(String memberName)
      Since:
      5.6
    • removeProperty

      public void removeProperty(int index)
      For dynamically remove properties to this tab
    • moveProperty

      public void moveProperty(int from, int to)
      Since:
      5.2
    • clearProperties

      public void clearProperties()
      For dynamically remove all properties to this tab
    • restoreDefaultProperties

      public void restoreDefaultProperties()
    • getBaseCondition

      public String getBaseCondition()
    • setBaseCondition

      public void setBaseCondition(String string)
    • hasBaseCondition

      public boolean hasBaseCondition()
    • filter

      public Object filter(Object[] objects) throws FilterException
      Apply the tab filter to sent objects.

      It's used to filter arguments.

      Throws:
      XavaException
      FilterException
    • getId

      public String getId()
    • getDefaultOrder

      public String getDefaultOrder()
    • setDefaultOrder

      public void setDefaultOrder(String defaultOrder)
    • hasDefaultOrder

      public boolean hasDefaultOrder()
    • cloneMetaTab

      public MetaTab cloneMetaTab()
    • getRemainingPropertiesNames

      public List<String> getRemainingPropertiesNames()
      Throws:
      XavaException
    • getRemainingPropertiesNamesUntilSecondLevel

      public List<String> getRemainingPropertiesNamesUntilSecondLevel()
      Throws:
      XavaException
      Since:
      5.2
    • addMetaRowStyle

      public void addMetaRowStyle(MetaRowStyle style)
    • setMetaRowStyles

      public void setMetaRowStyles(Collection<MetaRowStyle> styles)
    • hasRowStyles

      public boolean hasRowStyles()
    • getMetaRowStyles

      public Collection<MetaRowStyle> getMetaRowStyles()
    • getModelName

      public String getModelName()
    • setModelName

      public void setModelName(String modelName)
      Throws:
      XavaException
    • setDefaultValues

      public void setDefaultValues()
    • getSumPropertiesNames

      public Collection<String> getSumPropertiesNames()
      Sum properties names.

      It was renamed in v4.3 from getTotalPropertiesNames() to getSumPropertiesNames()

      Since:
      4.3
    • getEditor

      public String getEditor()
    • setEditor

      public void setEditor(String editor)
    • getEditors

      public String getEditors()
    • setEditors

      public void setEditors(String editors)
    • getEditableProperties

      public String getEditableProperties()
      Gets the comma-separated list of editable properties for this tab. Only plain editable properties are allowed.
      Returns:
      The editable properties as a comma-separated string, or null if not defined
      Since:
      7.6
    • setEditableProperties

      public void setEditableProperties(String editableProperties)
      Sets the comma-separated list of editable properties for this tab.
      Parameters:
      editableProperties - The editable properties to set as a comma-separated string
      Since:
      7.6
    • removeEditableMember

      public void removeEditableMember(String memberName)
      Removes a member from the editable properties list. If the member is a reference (e.g. "cliente"), all qualified properties starting with that reference (e.g. "cliente.numero", "cliente.nombre") will be removed.
      Parameters:
      memberName - The name of the member to remove
      Since:
      7.6
    • isPropertyEditable

      public boolean isPropertyEditable(String propertyName)
      Checks if a property is in the editable properties list.
      Parameters:
      propertyName - The name of the property to check
      Returns:
      true if the property is editable, false otherwise