public class GadgetWizardApi extends Object implements WizardListener
| Constructor and Description |
|---|
GadgetWizardApi()
Deprecated.
|
GadgetWizardApi(JavaScriptObject jsConfig)
Creates a new gadget wizard.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy this wizard.
|
void |
edit(String macroCall,
String title)
Starts the edit wizard, to edit the specified macro call.
|
void |
insert()
Starts the insert wizard, which will guide the user into choosing a macro and defining its parameters.
|
void |
onCancel(Wizard sender) |
protected void |
onEditDone(String macroCall,
String gadgetTitle)
Handles the call of the js callback when the edit is done.
|
void |
onFinish(Wizard sender,
Object result) |
protected void |
onInsertDone(String macroCall,
String gadgetTitle)
Handles the call of the js callback when the insert is done.
|
static void |
publish()
Publishes the JavaScript API that can be used to create and control
GadgetWizardApis. |
void |
setEditCallback(JavaScriptObject editHandler)
Sets the native js edit callback to be called when the edit wizard is done.
|
void |
setInsertCallback(JavaScriptObject insertHandler)
Sets the native js insert callback to be called when the insert wizard is done.
|
@Deprecated public GadgetWizardApi()
public GadgetWizardApi(JavaScriptObject jsConfig)
jsConfig - the JavaScriptObject used to configure the newly created gadgetpublic void insert()
public void setInsertCallback(JavaScriptObject insertHandler)
insertHandler - the native js callback to call when the insert wizard is finished successfully.protected void onInsertDone(String macroCall, String gadgetTitle)
macroCall - the macro call used as a content of this gadgetgadgetTitle - the title of the gadgetpublic void edit(String macroCall, String title)
macroCall - the macro call to edit, passed as a html comment from the annotated syntax.title - the title of the gadget to editpublic void setEditCallback(JavaScriptObject editHandler)
editHandler - the native js callback to call when the edit wizard is finished successfully.protected void onEditDone(String macroCall, String gadgetTitle)
macroCall - the new macro call used as a content of the edited gadgetgadgetTitle - the title of the gadgetpublic void onCancel(Wizard sender)
onCancel in interface WizardListenerWizardListener.onCancel(Wizard)public void onFinish(Wizard sender, Object result)
onFinish in interface WizardListenerWizardListener.onFinish(Wizard, Object)public void destroy()
public static void publish()
GadgetWizardApis.Copyright © 2004–2015 XWiki. All rights reserved.