wicket.contrib.tinymce
Class InPlaceEditBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by wicket.contrib.tinymce.TinyMceBehavior
          extended by wicket.contrib.tinymce.InPlaceEditBehavior
All Implemented Interfaces:
Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

public class InPlaceEditBehavior
extends TinyMceBehavior

This behavior adds in-place editing functionality to wicket components. In most cases you will want to use InPlaceEditComponent instead of this class directly.

See Also:
Serialized Form

Constructor Summary
InPlaceEditBehavior(TinyMCESettings settings, org.apache.wicket.Component triggerComponent, WicketSavePlugin savePlugin)
          Construct in-place-editing behavior to a component.
 
Method Summary
protected  org.apache.wicket.markup.head.HeaderItem wrapTinyMceSettingsScript(String settingScript, org.apache.wicket.Component component)
          Wrap the initialization script for TinyMCE into a HeaderItem.
 
Methods inherited from class wicket.contrib.tinymce.TinyMceBehavior
bind, getAddTinyMceSettingsScript, getComponent, isMarkupIdRequired, renderHead
 
Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, onRemove, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InPlaceEditBehavior

public InPlaceEditBehavior(TinyMCESettings settings,
                           org.apache.wicket.Component triggerComponent,
                           WicketSavePlugin savePlugin)
Construct in-place-editing behavior to a component. It makes the content of the component editable with a TinyMce WYSIWYG editor.

Parameters:
settings -
inPlaceSaveBehavior -
settings - TinyMceSettings for the editor when opened.
triggerComponent - Component that will get an onclick event to make the component that this behavior is added to editable. Can be the editable component itself, but can also be another component, e.g. a button. If set to null, you will have to start the editable state via a call to the javascriptfunction with name: #getStartEditorScriptName()
savePlugin -
Method Detail

wrapTinyMceSettingsScript

protected org.apache.wicket.markup.head.HeaderItem wrapTinyMceSettingsScript(String settingScript,
                                                                             org.apache.wicket.Component component)
Description copied from class: TinyMceBehavior
Wrap the initialization script for TinyMCE into a HeaderItem. In this way we can control when and how the script should be executed.

Overrides:
wrapTinyMceSettingsScript in class TinyMceBehavior
Parameters:
settingScript - the actual initialization script for TinyMCE
component - the target component that must be decorated with TinyMCE
Returns:
the HeaderItem containing


Copyright © 2004–2016. All rights reserved.