Class SequenceFieldDisplayer
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.displayers.AbstractFieldDisplayer<SequenceField>
-
- org.silverpeas.core.contribution.content.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
Constructors Constructor Description SequenceFieldDisplayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 javascript 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 org.silverpeas.core.contribution.content.form.displayers.AbstractFieldDisplayer
getDefaultValue, index, update
-
-
-
-
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 javascript 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.- Throws:
FormException
-
-