Class PublicationsPickerFieldDisplayer
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.displayers.AbstractFieldDisplayer<PublicationsPickerField>
-
- org.silverpeas.core.contribution.content.form.displayers.PublicationsPickerFieldDisplayer
-
- All Implemented Interfaces:
FieldDisplayer<PublicationsPickerField>
public class PublicationsPickerFieldDisplayer extends AbstractFieldDisplayer<PublicationsPickerField>
An PublicationsPickerFieldDisplayer is an object which allow to browse Silverpeas treeview (nodes) and to select publications
-
-
Constructor Summary
Constructors Constructor Description PublicationsPickerFieldDisplayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
display(PrintWriter out, PublicationsPickerField field, FieldTemplate template, PagesContext pageContext)
Prints the HTML value of the field.void
displayScripts(PrintWriter out, FieldTemplate template, PagesContext pageContext)
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 pageContext)
Return the number of HTML Objects displayed by the displayer.boolean
isDisplayedMandatory()
Method declarationList<String>
update(String newIds, PublicationsPickerField field, FieldTemplate template, PagesContext pageContext)
Updates the value of the field.List<String>
update(List<org.apache.commons.fileupload.FileItem> items, PublicationsPickerField field, FieldTemplate template, PagesContext pageContext)
Updates the value of the field.-
Methods inherited from class org.silverpeas.core.contribution.content.form.displayers.AbstractFieldDisplayer
getDefaultValue, index
-
-
-
-
Method Detail
-
getManagedTypes
public String[] getManagedTypes()
Returns the name of the managed types.
-
displayScripts
public void displayScripts(PrintWriter out, FieldTemplate template, PagesContext pageContext)
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 :- the fieldName is unknown by the template.
- the field type is not a managed type.
-
display
public void display(PrintWriter out, PublicationsPickerField field, FieldTemplate template, PagesContext pageContext) 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 :- the field type is not a managed type.
- Throws:
FormException
-
update
public List<String> update(String newIds, PublicationsPickerField field, FieldTemplate template, PagesContext pageContext) 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()
Method declaration
-
getNbHtmlObjectsDisplayed
public int getNbHtmlObjectsDisplayed(FieldTemplate template, PagesContext pageContext)
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.
-
update
public List<String> update(List<org.apache.commons.fileupload.FileItem> items, PublicationsPickerField field, FieldTemplate template, PagesContext pageContext) 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.- Specified by:
update
in interfaceFieldDisplayer<PublicationsPickerField>
- Overrides:
update
in classAbstractFieldDisplayer<PublicationsPickerField>
- Throws:
FormException
-
-