Class ReferenceListFactory

java.lang.Object
fr.paris.lutece.plugins.forms.util.ReferenceListFactory

public class ReferenceListFactory extends Object
Class which contains necessaries informations for creating a ReferenceList
  • Field Details

  • Constructor Details

    • ReferenceListFactory

      public ReferenceListFactory(Collection<?> collectionItem, String strCodeAttr, String strNameAttribute)
      Constructor
      Parameters:
      collectionItem - The collection of items to create the ReferenceList from
      strCodeAttr - The name of the code attribute to retrieve the data from the item
      strNameAttribute - The name of the name of attribute to retrieve the data from the item
    • ReferenceListFactory

      public ReferenceListFactory(Collection<?> collectionItem, String strCodeAttr, String strNameAttribute, boolean bNumerical)
      Constructor
      Parameters:
      collectionItem - The collection of items to create the ReferenceList from
      strCodeAttr - The name of the code attribute to retrieve the data from the item
      strNameAttribute - The name of the name of attribute to retrieve the data from the item
      bNumerical - The boolean which tell if the code of the item is of type numeric or not
  • Method Details

    • createReferenceList

      public fr.paris.lutece.util.ReferenceList createReferenceList()
      Create the ReferenceList with the parameter values
      Returns:
      the ReferenceList created with the parameters values
    • setDefaultName

      public void setDefaultName(String strDefaultName)
      Set the default name of the default ReferenceItem
      Parameters:
      strDefaultName - The strDefaultName to set
    • setDefaultSortNeeded

      public void setDefaultSortNeeded(boolean bDefaultSortNeeded)
      Set the boolean which tell if the default sort (based on the name value) is needed or not
      Parameters:
      bDefaultSortNeeded - The boolean which tell if the default sort (based on the name value) is needed or not