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

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<D>
              extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractListSelectorWizardStep<EntityLink<C>,E>
                  extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractEntityListSelectorWizardStep<LinkConfig,Attachment>
                      extended by org.xwiki.gwt.wysiwyg.client.plugin.link.ui.CurrentPageAttachmentSelectorWizardStep
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

public class CurrentPageAttachmentSelectorWizardStep
extends AbstractEntityListSelectorWizardStep<LinkConfig,Attachment>

Wizard step to select a file attached to a page.

Version:
$Id: ef1113eda301c48aefc805497c6d7946563c7d0a $

Constructor Summary
CurrentPageAttachmentSelectorWizardStep(WikiServiceAsync wikiService)
          Builds a selector from the attachments of the link origin page.
 
Method Summary
protected  void fetchData(com.google.gwt.user.client.rpc.AsyncCallback<List<Attachment>> callback)
          Fetches the list of items to be displayed in this list from the server.
protected  ListItem<Attachment> getListItem(Attachment data)
          
protected  ListItem<Attachment> getNewOptionListItem()
          
 String getNextStep()
          
protected  String getSelectErrorMessage()
          
protected  String getSelectHelpLabel()
          
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractEntityListSelectorWizardStep
isSelectedByDefault, saveSelectedValue
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractListSelectorWizardStep
addNavigationListener, display, displayError, fillList, getErrorLabel, getList, getSelectedItem, hideError, init, onCancel, onDoubleClick, onKeyUp, onSubmit, refreshList, removeNavigationListener, setActive, setNewOptionOnTop
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep
getData, getResult, initializeSelection
 
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, getValidDirections, setDirectionName, setNextStep, setValidDirections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentPageAttachmentSelectorWizardStep

public CurrentPageAttachmentSelectorWizardStep(WikiServiceAsync wikiService)
Builds a selector from the attachments of the link origin page.

Parameters:
wikiService - the service used to retrieve the attachments of the current page
Method Detail

getSelectHelpLabel

protected String getSelectHelpLabel()

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

getSelectErrorMessage

protected String getSelectErrorMessage()

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

fetchData

protected void fetchData(com.google.gwt.user.client.rpc.AsyncCallback<List<Attachment>> callback)
Fetches the list of items to be displayed in this list from the server.

Specified by:
fetchData in class AbstractListSelectorWizardStep<EntityLink<LinkConfig>,Attachment>
Parameters:
callback - the callback to notify when the fetching is done.

getListItem

protected ListItem<Attachment> getListItem(Attachment data)

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

getNewOptionListItem

protected ListItem<Attachment> getNewOptionListItem()

Overrides:
getNewOptionListItem in class AbstractListSelectorWizardStep<EntityLink<LinkConfig>,Attachment>
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 String getNextStep()

Specified by:
getNextStep in interface WizardStep
Overrides:
getNextStep in class AbstractNavigationAwareWizardStep


Copyright © 2004-2012 XWiki. All Rights Reserved.