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, org.apache.wicket.behavior.IBehaviorListener, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.IRequestListener, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable
public class InPlaceSaveBehavior
- extends org.apache.wicket.ajax.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
| Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
INDICATOR |
| Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener |
INTERFACE |
| Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, getChannel, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, renderHead |
| Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind |
| Methods inherited from class org.apache.wicket.behavior.Behavior |
beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemove |
| 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(org.apache.wicket.ajax.AjaxRequestTarget target)
- Specified by:
respond in class org.apache.wicket.ajax.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 org.apache.wicket.Component getTheComponent()
onSave
protected String onSave(org.apache.wicket.ajax.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:
target - the current ajax request handlernewContent - The content as received from the editor.
- Returns:
- The content that will be pushed back to your website.
getSaveCallback
public String getSaveCallback()
getCancelCallback
public String getCancelCallback()
updateAjaxAttributes
protected void updateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes)
- Overrides:
updateAjaxAttributes in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
Copyright © 2004–2016. All rights reserved.