com.silverpeas.form.displayers
Class SequenceFieldDisplayer

java.lang.Object
  extended by com.silverpeas.form.displayers.AbstractFieldDisplayer<SequenceField>
      extended by com.silverpeas.form.displayers.SequenceFieldDisplayer
All Implemented Interfaces:
FieldDisplayer<SequenceField>

public class SequenceFieldDisplayer
extends AbstractFieldDisplayer<SequenceField>

A SequenceFieldDisplayer is an object which can display a value corresponding to the setting of a sequence. A such value is only readable to guaranty validity of each value belonging to the sequence (unicity for instance).

See Also:
Field, FieldTemplate, Form, FieldDisplayer

Constructor Summary
SequenceFieldDisplayer()
           
 
Method Summary
 void display(PrintWriter out, SequenceField field, FieldTemplate template, PagesContext pagesContext)
          Prints the HTML value of the field.
 void displayScripts(PrintWriter out, FieldTemplate template, PagesContext pagesContext)
          Since the field is always in readonly state, no javascripts are needed to control the value given to the field.
 int getNbHtmlObjectsDisplayed(FieldTemplate template, PagesContext pagesContext)
          Returns the number of returned html objects.
 boolean isDisplayedMandatory()
          Returns true if the field can be set as mandatory.
 List<String> update(String value, SequenceField field, FieldTemplate template, PagesContext pagesContext)
          Updates the value of the field.
 
Methods inherited from class com.silverpeas.form.displayers.AbstractFieldDisplayer
index, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceFieldDisplayer

public SequenceFieldDisplayer()
Method Detail

display

public void display(PrintWriter out,
                    SequenceField field,
                    FieldTemplate template,
                    PagesContext pagesContext)
             throws FormException
Prints the HTML value of the field. The displayed value must be readable for the end user. The value format follows the field's setting. The field's name is used to name the html form input.

Throws:
FormException

displayScripts

public void displayScripts(PrintWriter out,
                           FieldTemplate template,
                           PagesContext pagesContext)
                    throws IOException
Since the field is always in readonly state, no javascripts are needed to control the value given to the field.

Throws:
IOException

getNbHtmlObjectsDisplayed

public int getNbHtmlObjectsDisplayed(FieldTemplate template,
                                     PagesContext pagesContext)
Returns the number of returned html objects.

Returns:
the number of HTML Objects displayed by the displayer.

isDisplayedMandatory

public boolean isDisplayedMandatory()
Returns true if the field can be set as mandatory.


update

public List<String> update(String value,
                           SequenceField field,
                           FieldTemplate template,
                           PagesContext pagesContext)
                    throws FormException
Updates the value of the field. The field's name is used to retrieve the HTTP parameter from the request.

Returns:
Throws:
FormException


Copyright © 2016 Silverpeas. All Rights Reserved.