wicket.contrib.tinymce
Class InPlaceSaveBehavior
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
wicket.contrib.tinymce.InPlaceSaveBehavior
- All Implemented Interfaces:
- Serializable, IBehaviorListener, IClusterable, IComponentAwareEventSink, IRequestListener, IComponentAwareHeaderContributor
public class InPlaceSaveBehavior
- extends AbstractDefaultAjaxBehavior
This behavior adds saving functionality to an editor for in-place editing of content. In most cases you will want to
use InPlaceEditComponent instead of this class directly.
- See Also:
- Serialized Form
| Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getChannel, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, throttleScript |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InPlaceSaveBehavior
public InPlaceSaveBehavior()
setAdditionalJavaScript
public void setAdditionalJavaScript(String additionalJavaScript)
- Parameters:
additionalJavaScript - Additional javascript code that will be appended to the save and cancel callback functions. You can
use this to e.g. show or hide buttons based on the state of the in-place-edit component.
respond
protected final void respond(AjaxRequestTarget target)
- Specified by:
respond in class AbstractDefaultAjaxBehavior
getSaveCallbackName
public final String getSaveCallbackName()
- Returns the name of the JavaScript function that handles the save event. (Replace the editor with the saved
content in the original component).
- Returns:
- Name of the javascript function, used by WicketSave plugin, see
WicketSavePlugin
getCancelCallbackName
public final String getCancelCallbackName()
getTheComponent
public Component getTheComponent()
onSave
protected String onSave(AjaxRequestTarget target,
String newContent)
- This method gets called before the new content as received from the TinyMce editor is pushed to the website.
Override it to add additional processing to the content.
- Parameters:
newContent - The content as received from the editor.
- Returns:
- The content that will be pushed back to your website.
renderHead
public void renderHead(Component c,
IHeaderResponse response)
- Specified by:
renderHead in interface IComponentAwareHeaderContributor- Overrides:
renderHead in class AbstractDefaultAjaxBehavior
Copyright © 2004-2011. All Rights Reserved.