com.silverpeas.form.displayers
Class PdcUserFieldDisplayer

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

public class PdcUserFieldDisplayer
extends AbstractFieldDisplayer<PdcUserField>

A PdcUserFieldDisplayer is an object which can display a UserFiel in HTML and can retrieve via HTTP any updated value.

See Also:
Field, FieldTemplate, Form, FieldDisplayer

Constructor Summary
PdcUserFieldDisplayer()
           
 
Method Summary
 void display(PrintWriter out, PdcUserField field, FieldTemplate template, PagesContext PagesContext)
          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()
          Returns the name of the managed types.
 int getNbHtmlObjectsDisplayed(FieldTemplate template, PagesContext pagesContext)
          Method declaration
 boolean isDisplayedMandatory()
          Method declaration
 List<String> update(String newId, PdcUserField 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

PdcUserFieldDisplayer

public PdcUserFieldDisplayer()
Method Detail

getManagedTypes

public String[] getManagedTypes()
Returns the name of the managed types.


displayScripts

public void displayScripts(PrintWriter out,
                           FieldTemplate template,
                           PagesContext PagesContext)
                    throws IOException
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 FieldTemplate gives the field type and constraints. The FieldTemplate gives the local labeld too. Never throws an Exception but log a silvertrace and writes an empty string when :

Throws:
IOException

display

public void display(PrintWriter out,
                    PdcUserField field,
                    FieldTemplate template,
                    PagesContext PagesContext)
             throws FormException
Prints the HTML value of the field. The displayed value must be updatable by the end user. 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 :

Throws:
FormException

update

public List<String> update(String newId,
                           PdcUserField field,
                           FieldTemplate template,
                           PagesContext pagesContext)
                    throws FormException
Updates the value of the field. The fieldName must be used to retrieve the HTTP parameter from the request.

Returns:
Throws:
FormException

isDisplayedMandatory

public boolean isDisplayedMandatory()
Method declaration

Returns:

getNbHtmlObjectsDisplayed

public int getNbHtmlObjectsDisplayed(FieldTemplate template,
                                     PagesContext pagesContext)
Method declaration

Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.