com.silverpeas.form.displayers
Class WysiwygFCKFieldDisplayer

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

public class WysiwygFCKFieldDisplayer
extends AbstractFieldDisplayer<TextField>

A WysiwygFieldDisplayer is an object which can display a TextFiel in HTML the content of a TextFiel to a end user and can retrieve via HTTP any updated value.

See Also:
Field, FieldTemplate, Form, FieldDisplayer

Field Summary
static String dbKey
           
static String dir
           
 
Constructor Summary
WysiwygFCKFieldDisplayer()
          Constructeur
 
Method Summary
 void cloneContents(ForeignPK fromPK, ForeignPK 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 PagesContext)
          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)
           
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 entry
 boolean isDisplayedMandatory()
           
 void mergeContents(String componentIdFrom, String objectIdFrom, String componentIdTo, String objectIdTo)
           
 void move(ForeignPK fromPK, ForeignPK toPK)
           
static void removeContents(ForeignPK pk)
           
 List<String> update(String newValue, TextField field, FieldTemplate template, PagesContext pageContext)
          Updates the value of the field.
 
Methods inherited from class com.silverpeas.form.displayers.AbstractFieldDisplayer
update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbKey

public static final String dbKey
See Also:
Constant Field Values

dir

public static final String dir
See Also:
Constant Field Values
Constructor Detail

WysiwygFCKFieldDisplayer

public WysiwygFCKFieldDisplayer()
Constructeur

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 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 :

Parameters:
out -
template -
PagesContext -
Throws:
IOException

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 silvertrace and writes an empty string when :

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 -
Returns:
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 interface FieldDisplayer<TextField>
Overrides:
index in class AbstractFieldDisplayer<TextField>

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)
                                 throws UtilException
Throws:
UtilException

getContentFromFile

public static String getContentFromFile(String componentId,
                                        String objectId,
                                        String fieldName,
                                        String language)
                                 throws UtilException
Throws:
UtilException

move

public void move(ForeignPK fromPK,
                 ForeignPK toPK)
          throws IOException
Throws:
IOException

cloneContents

public void cloneContents(ForeignPK fromPK,
                          ForeignPK toPK,
                          Map<String,String> oldAndNewFileIds)
                   throws IOException
Throws:
IOException

mergeContents

public void mergeContents(String componentIdFrom,
                          String objectIdFrom,
                          String componentIdTo,
                          String objectIdTo)
                   throws UtilException,
                          IOException
Throws:
UtilException
IOException

getFile

public static String getFile(String componentId,
                             String objectId,
                             String fieldName,
                             String language)

removeContents

public static void removeContents(ForeignPK pk)


Copyright © 2016 Silverpeas. All Rights Reserved.