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, IClusterable, IComponentAwareEventSink, IComponentAwareHeaderContributor

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, Component triggerComponent)
          Construct in-place-editing behavior to a component.
 
Method Summary
protected  String getRenderJavascript(IHeaderResponse response)
           
protected  String getRenderOnDomReadyJavascript(IHeaderResponse response)
           
 String getStartEditorScriptName()
           
 
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, 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,
                           Component triggerComponent)
Construct in-place-editing behavior to a component. It makes the content of the component editable with a TinyMce WYSIWYG editor.

Parameters:
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()
Method Detail

getRenderOnDomReadyJavascript

protected String getRenderOnDomReadyJavascript(IHeaderResponse response)
Overrides:
getRenderOnDomReadyJavascript in class TinyMceBehavior

getRenderJavascript

protected String getRenderJavascript(IHeaderResponse response)
Overrides:
getRenderJavascript in class TinyMceBehavior

getStartEditorScriptName

public final String getStartEditorScriptName()
Returns:
The name of the (no-argument) JavaScript that will replace the component that is bound to this behavior with a TinyMce editor.


Copyright © 2004-2011. All Rights Reserved.