org.xwiki.gwt.wysiwyg.client.plugin.link.ui
Class AbstractExplorerWizardStep

java.lang.Object
  extended by org.xwiki.gwt.user.client.ui.wizard.AbstractNavigationAwareWizardStep
      extended by org.xwiki.gwt.user.client.ui.wizard.AbstractInteractiveWizardStep
          extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep<EntityLink<LinkConfig>>
              extended by org.xwiki.gwt.wysiwyg.client.plugin.link.ui.AbstractExplorerWizardStep
All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler, com.smartgwt.client.widgets.events.KeyPressHandler, com.smartgwt.client.widgets.grid.events.RecordDoubleClickHandler, SourcesNavigationEvents, WizardStep
Direct Known Subclasses:
AttachmentExplorerWizardStep, WikiPageExplorerWizardStep

public abstract class AbstractExplorerWizardStep
extends AbstractSelectorWizardStep<EntityLink<LinkConfig>>
implements SourcesNavigationEvents, com.smartgwt.client.widgets.grid.events.RecordDoubleClickHandler, com.smartgwt.client.widgets.events.KeyPressHandler

Wizard step to provide an interface to selecting a wiki resource, using an XWikiExplorer.

Version:
$Id: e71f69bc9e4c74a142a98da7a880bebe1f9b9160 $

Field Summary
protected static String FIELD_ERROR_STYLE
          The style of the fields under error.
 
Constructor Summary
  AbstractExplorerWizardStep(boolean addPage, boolean showAttachments, boolean addAttachments)
          Builds a AbstractExplorerWizardStep from the passed settings.
protected AbstractExplorerWizardStep(boolean addPage, boolean showAttachments, boolean addAttachments, int width, int height)
          Builds a AbstractExplorerWizardStep from the passed settings, with parameters for size.
 
Method Summary
 void addNavigationListener(NavigationListener listener)
          
 VerticalResizePanel display()
          
protected  void displayError(String errorMessage)
          Displays the passed error message and markers in this wizard step.
 XWikiExplorer getExplorer()
           
protected  void hideError()
          Hides the error messages and markers in this wizard step.
 void init(Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
          
protected  void initializeSelection(com.google.gwt.user.client.rpc.AsyncCallback<?> initCallback)
          Initializes the selection on AbstractSelectorWizardStep.init(Object, AsyncCallback) time.
protected  void invalidateExplorerData()
          Invalidates the cache on the explorer, so that it will be reloaded on next display.
 void onCancel()
          
 void onKeyPress(com.smartgwt.client.widgets.events.KeyPressEvent event)
          
 void onRecordDoubleClick(com.smartgwt.client.widgets.grid.events.RecordDoubleClickEvent event)
          
 void removeNavigationListener(NavigationListener listener)
          
 void setHelpLabelText(String helpLabelText)
          Sets the help message to be displayed on top of the explorer tree.
protected  void updateLinkConfig(EntityReference selectedEntityReference)
          Updates the link configuration object based on the selected entity.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep
getData, getResult, setActive
 
Methods inherited from class org.xwiki.gwt.user.client.ui.wizard.AbstractInteractiveWizardStep
getStepTitle, isAutoSubmit, setStepTitle
 
Methods inherited from class org.xwiki.gwt.user.client.ui.wizard.AbstractNavigationAwareWizardStep
getDirectionName, getNextStep, getValidDirections, setDirectionName, setNextStep, setValidDirections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.gwt.user.client.ui.wizard.WizardStep
onSubmit
 

Field Detail

FIELD_ERROR_STYLE

protected static final String FIELD_ERROR_STYLE
The style of the fields under error.

See Also:
Constant Field Values
Constructor Detail

AbstractExplorerWizardStep

public AbstractExplorerWizardStep(boolean addPage,
                                  boolean showAttachments,
                                  boolean addAttachments)
Builds a AbstractExplorerWizardStep from the passed settings.

Parameters:
addPage - specifies whether the wiki explorer should show the option to add a page
showAttachments - specifies whether the wiki explorer should show the attached files for pages
addAttachments - specifies whether the wiki explorer should show the option to add an attachment

AbstractExplorerWizardStep

protected AbstractExplorerWizardStep(boolean addPage,
                                     boolean showAttachments,
                                     boolean addAttachments,
                                     int width,
                                     int height)
Builds a AbstractExplorerWizardStep from the passed settings, with parameters for size.
FIXME: remove the size parameters when the explorer will be correctly sizable from CSS.

Parameters:
addPage - specifies whether the wiki explorer should show the option to add a page
showAttachments - specifies whether the wiki explorer should show the attached files for pages
addAttachments - specifies whether the wiki explorer should show the option to add an attachment
width - explorer width in pixels
height - explorer height in pixels
Method Detail

setHelpLabelText

public void setHelpLabelText(String helpLabelText)
Sets the help message to be displayed on top of the explorer tree.

Parameters:
helpLabelText - the new help message

invalidateExplorerData

protected void invalidateExplorerData()
Invalidates the cache on the explorer, so that it will be reloaded on next display. To be used to request an update of the tree when new data is added to it.


display

public VerticalResizePanel display()

Specified by:
display in interface WizardStep
Overrides:
display in class AbstractInteractiveWizardStep

getExplorer

public XWikiExplorer getExplorer()
Returns:
the wiki explorer used by this selector

init

public void init(Object data,
                 com.google.gwt.user.client.rpc.AsyncCallback<?> cb)

Specified by:
init in interface WizardStep
Overrides:
init in class AbstractSelectorWizardStep<EntityLink<LinkConfig>>
See Also:
WizardStep.init(Object, AsyncCallback)

initializeSelection

protected void initializeSelection(com.google.gwt.user.client.rpc.AsyncCallback<?> initCallback)
Initializes the selection on AbstractSelectorWizardStep.init(Object, AsyncCallback) time.

Overrides:
initializeSelection in class AbstractSelectorWizardStep<EntityLink<LinkConfig>>
Parameters:
initCallback - the initialization callback, to handle asynchronous initialization
See Also:
AbstractSelectorWizardStep.initializeSelection(AsyncCallback)

displayError

protected void displayError(String errorMessage)
Displays the passed error message and markers in this wizard step.

Parameters:
errorMessage - the error message to print

hideError

protected void hideError()
Hides the error messages and markers in this wizard step.


addNavigationListener

public void addNavigationListener(NavigationListener listener)

Specified by:
addNavigationListener in interface SourcesNavigationEvents

removeNavigationListener

public void removeNavigationListener(NavigationListener listener)

Specified by:
removeNavigationListener in interface SourcesNavigationEvents

onRecordDoubleClick

public void onRecordDoubleClick(com.smartgwt.client.widgets.grid.events.RecordDoubleClickEvent event)

Specified by:
onRecordDoubleClick in interface com.smartgwt.client.widgets.grid.events.RecordDoubleClickHandler

onKeyPress

public void onKeyPress(com.smartgwt.client.widgets.events.KeyPressEvent event)

Specified by:
onKeyPress in interface com.smartgwt.client.widgets.events.KeyPressHandler

updateLinkConfig

protected void updateLinkConfig(EntityReference selectedEntityReference)
Updates the link configuration object based on the selected entity.

Parameters:
selectedEntityReference - a reference to the selected entity

onCancel

public void onCancel()

Specified by:
onCancel in interface WizardStep
See Also:
WizardStep.onCancel()


Copyright © 2004–2015 XWiki. All rights reserved.