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

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep<D>
      extended by com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractListSelectorWizardStep<LinkConfig,WikiPage>
          extended by com.xpn.xwiki.wysiwyg.client.plugin.link.ui.AbstractPageListSelectorWizardStep
All Implemented Interfaces:
com.google.gwt.event.dom.client.DoubleClickHandler, com.google.gwt.event.dom.client.KeyUpHandler, com.google.gwt.event.shared.EventHandler, SourcesNavigationEvents, WizardStep
Direct Known Subclasses:
RecentChangesSelectorWizardStep, SearchSelectorWizardStep

public abstract class AbstractPageListSelectorWizardStep
extends AbstractListSelectorWizardStep<LinkConfig,WikiPage>

Wizard step to select the wiki page to link to, from a list of wiki pages.

Version:
$Id: AbstractPageListSelectorWizardStep.java 25780 2009-12-14 09:41:47Z mflorea $

Constructor Summary
AbstractPageListSelectorWizardStep(ResourceName editedResource)
          Builds a selector from a list of pages of the specified page.
 
Method Summary
protected  ListItem<WikiPage> getListItem(WikiPage data)
          
protected  ListItem<WikiPage> getNewOptionListItem()
          
 java.lang.String getNextStep()
          
protected  java.lang.String getSelectErrorMessage()
          
protected  java.lang.String getSelectHelpLabel()
          
protected  java.lang.String getSelection()
          
 java.lang.String getStepTitle()
          
protected  boolean matchesSelection(WikiPage item, java.lang.String selection)
          Compares the current item with the passed string representation of the wizard step's selection.
protected  void saveSelectedValue()
          Saves the current selection in this panel in the data managed by this wizard step, if all validation goes well on the sumbit time.
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractListSelectorWizardStep
addNavigationListener, display, displayError, fetchData, fillList, getErrorLabel, getList, getMainPanel, getSelectedItem, hideError, init, onCancel, onDoubleClick, onKeyUp, onSubmit, refreshList, removeNavigationListener, setActive, setNewOptionOnTop
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep
getData, getDirectionName, getResult, getValidDirections, initializeSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPageListSelectorWizardStep

public AbstractPageListSelectorWizardStep(ResourceName editedResource)
Builds a selector from a list of pages of the specified page.

Parameters:
editedResource - the currently edited resource (page for which editing is done)
Method Detail

getSelectHelpLabel

protected java.lang.String getSelectHelpLabel()

Specified by:
getSelectHelpLabel in class AbstractListSelectorWizardStep<LinkConfig,WikiPage>
Returns:
the help label for this selector step.

getSelectErrorMessage

protected java.lang.String getSelectErrorMessage()

Specified by:
getSelectErrorMessage in class AbstractListSelectorWizardStep<LinkConfig,WikiPage>
Returns:
the error message to be displayed in case of an error in selection

getSelection

protected java.lang.String getSelection()

Overrides:
getSelection in class AbstractListSelectorWizardStep<LinkConfig,WikiPage>
Returns:
the selection of this wizard step, as a string representation of the value selected in the list or from the other settings of the current wizard step. To be used in conjunction with #matchesSelection(AbstractSelectorWizardStep, String) to handle selection preserving upon update in this step's list.
See Also:
#matchesSelection(AbstractSelectorWizardStep, String)

matchesSelection

protected boolean matchesSelection(WikiPage item,
                                   java.lang.String selection)
Compares the current item with the passed string representation of the wizard step's selection.

Overrides:
matchesSelection in class AbstractListSelectorWizardStep<LinkConfig,WikiPage>
Parameters:
item - the item to compare with the selection
selection - the unique representation of the step's selection
Returns:
true if the item matches the selection, false otherwise.
See Also:
AbstractListSelectorWizardStep.getSelection()

getListItem

protected ListItem<WikiPage> getListItem(WikiPage data)

Specified by:
getListItem in class AbstractListSelectorWizardStep<LinkConfig,WikiPage>
Parameters:
data - the data to build a list item representation for.
Returns:
a list item for the passed data.

getNewOptionListItem

protected ListItem<WikiPage> getNewOptionListItem()

Overrides:
getNewOptionListItem in class AbstractListSelectorWizardStep<LinkConfig,WikiPage>
Returns:
an list item representation for a new item to add in the managed list, or null if no such item should be appended to the list.

getNextStep

public java.lang.String getNextStep()


getStepTitle

public java.lang.String getStepTitle()


saveSelectedValue

protected void saveSelectedValue()
Saves the current selection in this panel in the data managed by this wizard step, if all validation goes well on the sumbit time.

Specified by:
saveSelectedValue in class AbstractListSelectorWizardStep<LinkConfig,WikiPage>
See Also:
AbstractListSelectorWizardStep.onSubmit(AsyncCallback)


Copyright © 2004-2010 XWiki. All Rights Reserved.