Class WysiwygInlineEditionHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants

public class WysiwygInlineEditionHandler extends JcmsFormHandler
Java bean providing processing of for inline edition of wysiwyg fields.

See WysiwygTag and jcore/wysiwyg/wysiwygInline.jsp.

Since:
jcms-10.0.0
  • Field Details

    • IS_WYSIWYG_INLINE

      public static final String IS_WYSIWYG_INLINE
      Name of Boolean attribute added to the current request to indicate the request is a wysiwyg inline call (edition or rendering).
      Since:
      jcms-10.0.3 / JCMS-7627
      See Also:
  • Constructor Details

    • WysiwygInlineEditionHandler

      public WysiwygInlineEditionHandler()
  • Method Details

    • processAction

      public boolean processAction() throws IOException
      Description copied from class: JcmsFormHandler
      Method to be implemented to check/validate action to be performed and process them.

      Default implementation is to return false. No need to call super method.

      This method may NOT be invoked at all if security validation are not met.

      You must ensure your handler and JSP can work properly without any code invoked in this method.

      Overrides:
      processAction in class JcmsFormHandler
      Returns:
      false if no redirection is needed, true otherwise
      Throws:
      IOException - IO Exception
    • validateInlineEdition

      public boolean validateInlineEdition()
    • getEditHandlerPath

      public String getEditHandlerPath()
    • getEditHandlerFromAttribute

      public EditPublicationHandler getEditHandlerFromAttribute()
    • initEditState

      public void initEditState()
    • getFormHandler

      public EditPublicationHandler getFormHandler()
    • getPublication

      public Publication getPublication()
      Overrides:
      getPublication in class JcmsJspContext
      Returns:
      the current Content or Form if not null, or the Portlet (or null). Slow: we DO NOT cache this value (so do not use this getter every 2millisecs).
    • getEditedFieldValue

      public Object getEditedFieldValue()
    • isFinished

      public boolean isFinished()
    • isUpdateAndContinue

      public boolean isUpdateAndContinue()
    • getFirstWarningMessage

      public String getFirstWarningMessage()
    • isShowWysiwygInlineButtonsAfter

      public boolean isShowWysiwygInlineButtonsAfter()
    • getEditFormPositionCss

      public String getEditFormPositionCss()
    • getEditFormId

      public String getEditFormId()
    • getEditFormDomId

      public String getEditFormDomId()
    • getEditFormName

      public String getEditFormName()
    • getEditFormStyleAttribute

      public String getEditFormStyleAttribute()
    • getInlineButtonsStyleAttribute

      public String getInlineButtonsStyleAttribute()
    • getAvailableMainLanguage

      public String getAvailableMainLanguage()
      Overrides:
      getAvailableMainLanguage in class JcmsFormHandler
    • getWorkspaceId

      public String getWorkspaceId()
    • getSaveAndContinueDataAttribute

      public DataAttribute getSaveAndContinueDataAttribute()
    • getWysiwygSettings

      public DefaultSettings getWysiwygSettings()
    • getTypeFieldEntry

      public TypeFieldEntry getTypeFieldEntry()
    • setId

      public void setId(String id)
    • getId

      public String getId()
    • setField

      public void setField(String field)
    • getField

      public String getField()
    • getScrollTo

      public String getScrollTo()
    • setScrollTo

      public void setScrollTo(String scrollTo)
    • setWysiwygInlineHeight

      public void setWysiwygInlineHeight(String wysiwygInlineHeight)
    • canEditField

      public static boolean canEditField(Data data, String fieldName, Member loggedMember)
      Check if the specified member can edit the specified field of the specified data.

      All parameters are required to grant edition.
      Authorization is be refused if null or empty values are specified.

      Parameters:
      data - the Data to edit
      fieldName - the name of the field to edit as specified in type xml
      loggedMember - the Member for which inline edition action is being verified
      Returns:
      true if member is authorized, false otherwise
    • getOpUpdate

      public String getOpUpdate()
    • setOpUpdate

      public void setOpUpdate(String opUpdate)