Class UniqueIdFieldDisplayer
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.displayers.AbstractFieldDisplayer<TextField>
-
- org.silverpeas.core.contribution.content.form.displayers.UniqueIdFieldDisplayer
-
- All Implemented Interfaces:
FieldDisplayer<TextField>
public class UniqueIdFieldDisplayer extends AbstractFieldDisplayer<TextField>
The UniqueIdFieldDisplayer displays a unique id as string in a read-only mode Unique id is the result of the new Date().getTime() operation. A suffix can be added by using the "suffix" parameter (value "userid")- Author:
- Nicolas EYSSERIC
- See Also:
Field
,FieldTemplate
,Form
,FieldDisplayer
-
-
Constructor Summary
Constructors Constructor Description UniqueIdFieldDisplayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
display(PrintWriter out, TextField field, FieldTemplate template, PagesContext pageContext)
Prints the HTML value of the field.void
displayScripts(PrintWriter out, FieldTemplate template, PagesContext pagesContext)
Prints the javascripts which will be used to control the new value given to the named field.String[]
getManagedTypes()
int
getNbHtmlObjectsDisplayed(FieldTemplate template, PagesContext pagesContext)
Return the number of HTML Objects displayed by the displayer.boolean
isDisplayedMandatory()
List<String>
update(String newValue, TextField 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
-
getManagedTypes
public String[] getManagedTypes()
-
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
-
display
public void display(PrintWriter out, TextField field, FieldTemplate template, PagesContext pageContext) 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
-
update
public List<String> update(String newValue, TextField 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
-
isDisplayedMandatory
public boolean isDisplayedMandatory()
-
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.
-
-