Class MetaTab

×News: XavaPro 7.7 released - March 11 · Read more
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
      Throws:
      XavaException
    • getMetaModel

      public MetaModel getMetaModel() throws XavaException
      Throws:
      XavaException
    • setMetaModel

      public void setMetaModel(MetaModel metaModel)
    • createDefault

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

      public static MetaTab createDefault(MetaModel metaModel)
    • getMetaProperties

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

      public String buildFilterConditionForContent(String content, Collection<String> propertiesToUse) throws XavaException
      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) throws XavaException
      Convenience overload that filters using all non-calculated visible properties of this tab.
      Throws:
      XavaException
      Since:
      7.6.3
    • getMetaPropertiesHidden

      public Collection getMetaPropertiesHidden() throws XavaException
      Throws:
      XavaException
    • namesToMetaProperties

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

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

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

      public boolean hasCalculatedProperties() throws XavaException
      Throws:
      XavaException
    • getTableColumns

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

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

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

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

      public List getHiddenPropertiesNames() throws XavaException
      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
      Throws:
      XavaException
    • getCmpFieldsColumnsInMultipleProperties

      public Collection getCmpFieldsColumnsInMultipleProperties() throws XavaException
      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, XavaException
      Apply the tab filter to sent objects.

      It's used to filter arguments.

      Throws:
      FilterException
      XavaException
    • 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
      Throws:
      XavaException
    • getRemainingPropertiesNamesUntilSecondLevel

      public List getRemainingPropertiesNamesUntilSecondLevel() throws XavaException
      Throws:
      XavaException
      Since:
      5.2
    • addMetaRowStyle

      public void addMetaRowStyle(MetaRowStyle style)
    • setMetaRowStyles

      public void setMetaRowStyles(Collection styles)
    • hasRowStyles

      public boolean hasRowStyles()
    • getMetaRowStyles

      public Collection getMetaRowStyles()
    • getModelName

      public String getModelName()
    • setModelName

      public void setModelName(String modelName) throws XavaException
      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