Class WysiwygFCKFieldDisplayer
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.displayers.AbstractFieldDisplayer<TextField>
-
- org.silverpeas.core.contribution.content.form.displayers.WysiwygFCKFieldDisplayer
-
- All Implemented Interfaces:
FieldDisplayer<TextField>
public class WysiwygFCKFieldDisplayer extends AbstractFieldDisplayer<TextField>
A WysiwygFieldDisplayer is an object which can display a TextField in HTML the content of a TextField to a end user and can retrieve via HTTP any updated value.- See Also:
Field
,FieldTemplate
,Form
,FieldDisplayer
-
-
Constructor Summary
Constructors Constructor Description WysiwygFCKFieldDisplayer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cloneContents(ResourceReference fromPK, ResourceReference toPK, Map<String,String> oldAndNewFileIds)
void
display(PrintWriter out, TextField 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.void
duplicateContent(Field field, FieldTemplate template, PagesContext pageContext, String newObjectId)
String
duplicateContent(FieldTemplate template, ResourceReference from, ResourceReference to, String language)
static String
getContentFromFile(String componentId, String fileName)
static String
getContentFromFile(String componentId, String objectId, String fieldName)
static String
getContentFromFile(String componentId, String objectId, String fieldName, String language)
static String
getFile(String componentId, String objectId, String fieldName, String language)
String[]
getManagedTypes()
Returns the name of the managed types.int
getNbHtmlObjectsDisplayed(FieldTemplate template, PagesContext pagesContext)
Return the number of HTML Objects displayed by the displayer.void
index(FullIndexEntry indexEntry, String key, String fieldName, TextField field, String language, boolean store)
Add the content of the field to the index entryboolean
isDisplayedMandatory()
void
mergeContents(String componentIdFrom, String objectIdFrom, String componentIdTo, String objectIdTo)
void
move(ResourceReference fromPK, ResourceReference toPK)
static void
removeContents(ResourceReference pk, List<String> fieldNames, String language)
List<String>
update(String newValue, TextField field, FieldTemplate template, PagesContext pageContext)
Updates the value of the field.-
Methods inherited from class org.silverpeas.core.contribution.content.form.displayers.AbstractFieldDisplayer
getDefaultValue, update
-
-
-
-
Field Detail
-
DB_KEY
public static final String DB_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getManagedTypes
public String[] getManagedTypes()
Returns the name of the managed types.- 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 message and writes an empty string when :- the fieldName is unknown by the template.
- the field type is not a managed type.
- Parameters:
out
-template
-pageContext
-
-
display
public void display(PrintWriter out, TextField 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 message and writes an empty string when :- the field type is not a managed type.
- Parameters:
out
-field
-template
-pageContext
-- Throws:
FormException
-
update
public List<String> update(String newValue, TextField field, FieldTemplate template, PagesContext pageContext) throws FormException
Updates the value of the field. The fieldName must be used to retrieve the HTTP parameter from the request.- Parameters:
newValue
-pageContext
-- 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.
-
index
public void index(FullIndexEntry indexEntry, String key, String fieldName, TextField field, String language, boolean store)
Description copied from interface:FieldDisplayer
Add the content of the field to the index entry- Specified by:
index
in interfaceFieldDisplayer<TextField>
- Overrides:
index
in classAbstractFieldDisplayer<TextField>
-
duplicateContent
public String duplicateContent(FieldTemplate template, ResourceReference from, ResourceReference to, String language)
-
duplicateContent
public void duplicateContent(Field field, FieldTemplate template, PagesContext pageContext, String newObjectId) throws FormException
- Throws:
FormException
-
getContentFromFile
public static String getContentFromFile(String componentId, String objectId, String fieldName)
-
getContentFromFile
public static String getContentFromFile(String componentId, String objectId, String fieldName, String language)
-
move
public void move(ResourceReference fromPK, ResourceReference toPK) throws IOException
- Throws:
IOException
-
cloneContents
public void cloneContents(ResourceReference fromPK, ResourceReference toPK, Map<String,String> oldAndNewFileIds) throws IOException
- Throws:
IOException
-
mergeContents
public void mergeContents(String componentIdFrom, String objectIdFrom, String componentIdTo, String objectIdTo)
-
getFile
public static String getFile(String componentId, String objectId, String fieldName, String language)
-
removeContents
public static void removeContents(ResourceReference pk, List<String> fieldNames, String language)
-
-