Class PdcFieldDisplayer

    • Constructor Detail

      • PdcFieldDisplayer

        public PdcFieldDisplayer()
    • Method Detail

      • display

        public void display​(PrintWriter out,
                            PdcField field,
                            FieldTemplate template,
                            PagesContext pagesContext)
                     throws FormException
        Description copied from interface: FieldDisplayer
        Prints the HTML value of the field. The value format may be adapted to a local language. The fieldName must be used to name the html form input. Never throws an Exception but log a silvertrace and writes an empty string when :
        • the field type is not a managed type.
        Throws:
        FormException
      • displayScripts

        public void displayScripts​(PrintWriter out,
                                   FieldTemplate template,
                                   PagesContext pagesContext)
                            throws IOException
        Description copied from interface: FieldDisplayer
        Prints the javascripts which will be used to control the new value given to the named field. The error messages may be adapted to a local language. The Field gives the field type and constraints. The Field gives the local labeld too. Never throws an Exception but log a silvertrace and writes an empty string when :
        • the fieldName is unknown by the template.
        • the field type is not a managed type.
        Throws:
        IOException
      • getNbHtmlObjectsDisplayed

        public int getNbHtmlObjectsDisplayed​(FieldTemplate template,
                                             PagesContext pagesContext)
        Description copied from interface: FieldDisplayer
        Return the number of HTML Objects displayed by the displayer.
        Returns:
        the number of HTML Objects displayed by the displayer.
      • isDisplayedMandatory

        public boolean isDisplayedMandatory()
      • update

        public List<String> update​(String value,
                                   PdcField field,
                                   FieldTemplate template,
                                   PagesContext pagesContext)
                            throws FormException
        Description copied from interface: FieldDisplayer
        Updates the value of the field. The fieldName must be used to retrieve the HTTP parameter from the request. @throw FormException if the field type is not a managed type. @throw FormException if the field doesn't accept the new value.
        Throws:
        FormException
      • getUsedAxisList

        public ArrayList<UsedAxis> getUsedAxisList​(String value)
        Parameters:
        value - The description of used axis which are needed, following the pattern : axisId1,baseValueId1,mandatory1,variant1.axisId2,baseValueId2,mandatory2,variant2...
        Returns:
        The list of used axis corresponding to the description given as parameter.
      • getAxisHtml

        public String getAxisHtml​(String value,
                                  String language)
        Parameters:
        value - The description of used axis which are needed, following the pattern : axisId1,baseValueId1,mandatory1,variant1.axisId2,baseValueId2,mandatory2,variant2...
        language - The language to use to display axis content.
        Returns:
        The HTML content corresponding to the description and language given as parameters.
      • getPositionsDivContent

        public String getPositionsDivContent​(String fieldName,
                                             String pattern,
                                             String language)
        Parameters:
        fieldName - The name of the PDC field.
        pattern - The description of required positions, following the pattern : axisId1_1,valueId1_1;axisId1_2,valueId1_2.axisId2_1,valueId2_1... where axisIdi_j and valueIdi_j correspond to the value #j of the position #i.
        language - The language to use to display the positions content.
        Returns:
        The HTML content of the positions block defined for the PDC field.
      • getPositions

        public ArrayList<ClassifyPosition> getPositions​(String pattern)
        Parameters:
        pattern - The description of required positions, following the pattern : axisId1_1,valueId1_1;axisId1_2,valueId1_2.axisId2_1,valueId2_1... where axisIdi_j and valueIdi_j correspond to the value #j of the position #i.
        Returns:
        The list of positions corresponding to the description given as parameter.