com.xpn.xwiki.wysiwyg.client.plugin.link.ui
Class AbstractExplorerWizardStep

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep<LinkConfig>
      extended by com.xpn.xwiki.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<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: AbstractExplorerWizardStep.java 24761 2009-10-29 15:45:32Z mflorea $

Field Summary
protected static java.lang.String FIELD_ERROR_STYLE
          The style of the fields under error.
 
Constructor Summary
  AbstractExplorerWizardStep(boolean addPage, boolean showAttachments, boolean addAttachments, java.lang.String defaultSelection)
          Builds a AbstractExplorerWizardStep from the passed settings.
protected AbstractExplorerWizardStep(boolean addPage, boolean showAttachments, boolean addAttachments, java.lang.String defaultSelection, int width, int height)
          Builds a AbstractExplorerWizardStep from the passed settings, with parameters for size.
 
Method Summary
 void addNavigationListener(NavigationListener listener)
          
 com.google.gwt.user.client.ui.Widget display()
          
protected  void displayError(java.lang.String errorMessage)
          Displays the passed error message and markers in this wizard step.
protected abstract  java.lang.String getDefaultErrorText()
           
 com.google.gwt.user.client.ui.Label getErrorLabel()
           
 XWikiExplorer getExplorer()
           
protected abstract  java.lang.String getHelpLabelText()
           
protected  void hideError()
          Hides the error messages and markers in this wizard step.
 void init(java.lang.Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
          
protected  void invalidateExplorerData()
          Invalidates the cache on the explorer, so that it will be reloaded on next display.
 void onKeyPress(com.smartgwt.client.widgets.events.KeyPressEvent event)
          
 void onRecordDoubleClick(com.smartgwt.client.widgets.grid.events.RecordDoubleClickEvent event)
          
 void removeNavigationListener(NavigationListener listener)
          
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep
getData, getDirectionName, getResult, getValidDirections, initializeSelection, setActive
 
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
getNextStep, getStepTitle, onCancel, onSubmit
 

Field Detail

FIELD_ERROR_STYLE

protected static final java.lang.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,
                                  java.lang.String defaultSelection)
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
defaultSelection - the default selection of the wiki explorer displayed by this step

AbstractExplorerWizardStep

protected AbstractExplorerWizardStep(boolean addPage,
                                     boolean showAttachments,
                                     boolean addAttachments,
                                     java.lang.String defaultSelection,
                                     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
defaultSelection - the default selection of the wiki explorer displayed by this step
width - explorer width in pixels
height - explorer height in pixels
Method Detail

getHelpLabelText

protected abstract java.lang.String getHelpLabelText()
Returns:
the help message for this explorer step, to be displayed on top of the explorer tree

getDefaultErrorText

protected abstract java.lang.String getDefaultErrorText()
Returns:
the default error message for this wizard step form

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 com.google.gwt.user.client.ui.Widget display()

Specified by:
display in interface WizardStep

getExplorer

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

getErrorLabel

public com.google.gwt.user.client.ui.Label getErrorLabel()
Returns:
the error label

init

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

Specified by:
init in interface WizardStep
Overrides:
init in class AbstractSelectorWizardStep<LinkConfig>

displayError

protected void displayError(java.lang.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


Copyright © 2004-2010 XWiki. All Rights Reserved.