D - the type of data edited by this wizard step, i.e. expected on initialization and returned as resultL - the type of data to add in the list handled by this wizard steppublic abstract class AbstractListSelectorWizardStep<D,L> extends AbstractSelectorWizardStep<D> implements com.google.gwt.event.dom.client.DoubleClickHandler, com.google.gwt.event.dom.client.KeyUpHandler, SourcesNavigationEvents
| Constructor and Description |
|---|
AbstractListSelectorWizardStep()
Default constructor, creating the UI of this wizard step.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNavigationListener(NavigationListener listener) |
VerticalResizePanel |
display() |
protected void |
displayError()
Displays the specified error message and error markers for this wizard step.
|
protected abstract void |
fetchData(com.google.gwt.user.client.rpc.AsyncCallback<List<L>> callback)
Fetches the list of items to be displayed in this list from the server.
|
protected ListItem<L> |
fillList(List<L> dataList,
L selectedData)
Fills the list with the given data and returns the item that matches the specified item.
|
protected com.google.gwt.user.client.ui.Label |
getErrorLabel() |
protected ListBox<L> |
getList() |
protected abstract ListItem<L> |
getListItem(L data) |
protected ListItem<L> |
getNewOptionListItem() |
protected ListItem<L> |
getSelectedItem()
Helper method to get the selected item in the list managed by this wizard step.
|
protected abstract String |
getSelectErrorMessage() |
protected abstract String |
getSelectHelpLabel() |
protected void |
hideError()
Hides the error markers for this wizard step.
|
void |
init(Object data,
com.google.gwt.user.client.rpc.AsyncCallback<?> cb) |
protected boolean |
isSelectedByDefault(L listItemData) |
void |
onCancel() |
void |
onDoubleClick(com.google.gwt.event.dom.client.DoubleClickEvent event) |
void |
onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event) |
void |
onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async) |
protected void |
refreshList(com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
Reloads the list of image previews in asynchronous manner.
|
void |
removeNavigationListener(NavigationListener listener) |
protected abstract void |
saveSelectedValue(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
Saves the current selection in this panel in the data managed by this wizard step, if all validation goes well on
the submit time.
|
void |
setActive()
Notifies this wizard step that it has been activated, when part of an aggregator for example.
|
void |
setNewOptionOnTop(boolean newOptionOnTop) |
getData, getResult, initializeSelectiongetStepTitle, isAutoSubmit, setStepTitlegetDirectionName, getNextStep, getValidDirections, setDirectionName, setNextStep, setValidDirectionspublic AbstractListSelectorWizardStep()
protected abstract String getSelectHelpLabel()
protected abstract String getSelectErrorMessage()
public void init(Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
init in interface WizardStepinit in class AbstractSelectorWizardStep<D>AbstractSelectorWizardStep.init(Object, AsyncCallback)protected void refreshList(com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
cb - the callback to handle server callprotected abstract void fetchData(com.google.gwt.user.client.rpc.AsyncCallback<List<L>> callback)
callback - the callback to notify when the fetching is done.protected ListItem<L> fillList(List<L> dataList, L selectedData)
dataList - the list of data to fill the listselectedData - the data to be matchedprotected boolean isSelectedByDefault(L listItemData)
listItemData - a list item datatrue of the list item with the given data should be selected by default, false otherwiseprotected abstract ListItem<L> getListItem(L data)
data - the data to build a list item representation for.protected ListItem<L> getNewOptionListItem()
null if no such item
should be appended to the list.public void onCancel()
onCancel in interface WizardStepWizardStep.onCancel()public void onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
onSubmit in interface WizardStepWizardStep.onSubmit(AsyncCallback)protected abstract void saveSelectedValue(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
async - the object to be notified after the selected value is savedonSubmit(AsyncCallback)protected void displayError()
protected void hideError()
public void onDoubleClick(com.google.gwt.event.dom.client.DoubleClickEvent event)
onDoubleClick in interface com.google.gwt.event.dom.client.DoubleClickHandlerDoubleClickHandler.onDoubleClick(DoubleClickEvent)public void onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event)
onKeyUp in interface com.google.gwt.event.dom.client.KeyUpHandlerpublic void addNavigationListener(NavigationListener listener)
addNavigationListener in interface SourcesNavigationEventspublic void removeNavigationListener(NavigationListener listener)
removeNavigationListener in interface SourcesNavigationEventsprotected ListBox<L> getList()
protected ListItem<L> getSelectedItem()
public VerticalResizePanel display()
display in interface WizardStepdisplay in class AbstractInteractiveWizardStepAbstractInteractiveWizardStep.display()public void setNewOptionOnTop(boolean newOptionOnTop)
newOptionOnTop - set whether the option to add a new item to the list should be added at the top of the list
or at its bottom.public void setActive()
setActive in class AbstractSelectorWizardStep<D>protected com.google.gwt.user.client.ui.Label getErrorLabel()
Copyright © 2004–2015 XWiki. All rights reserved.