com.xpn.xwiki.gwt.api.client.wizard
Class Wizard

java.lang.Object
  extended by com.xpn.xwiki.gwt.api.client.wizard.Wizard

public class Wizard
extends Object

See the NOTICE file distributed with this work for additional information regarding copyright ownership.

This is free software;you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation;either version2.1of the License,or(at your option)any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this software;if not,write to the Free Software Foundation,Inc.,51 Franklin St,Fifth Floor,Boston,MA 02110-1301 USA,or see the FSF site:http://www.fsf.org.


Field Summary
protected  XWikiGWTApp app
           
protected  com.google.gwt.user.client.rpc.AsyncCallback callback
           
protected  Object data
           
protected  List dialogs
           
protected  Map nextDialog
           
protected  List previousSteps
           
protected  int status
           
 
Constructor Summary
Wizard(XWikiGWTApp app, com.google.gwt.user.client.rpc.AsyncCallback callback)
           
 
Method Summary
 void addDialog(Dialog dialog)
           
 void addDialog(Dialog dialog, String nextDialogName)
           
 void cancel()
          Cancel this wizard
protected  void failWizard(Throwable caught)
          Override this function to perform actions in case of wizard failure
protected  void finishWizard()
          Override this function to perform actions at the end of the wizard
 Object getData()
           
 String getNextDialog(String dialogName)
           
 int getStatus()
           
 void launchWizard()
           
 void nextStep(Object data)
           
 void previousStep()
          Called on a 'back'
protected  void setData(Object data)
           
protected  void updateData(Object object)
          Override this function to update the data object from the result object of the dialog as well as to perform other functions like saving data to the server Default behavior overwrite the current data and no other action
protected  void updateStatus()
          Override this function if we want to branch to a different dialog depending on the selection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

app

protected XWikiGWTApp app

callback

protected com.google.gwt.user.client.rpc.AsyncCallback callback

dialogs

protected List dialogs

nextDialog

protected Map nextDialog

status

protected int status

data

protected Object data

previousSteps

protected List previousSteps
Constructor Detail

Wizard

public Wizard(XWikiGWTApp app,
              com.google.gwt.user.client.rpc.AsyncCallback callback)
Method Detail

addDialog

public void addDialog(Dialog dialog)

addDialog

public void addDialog(Dialog dialog,
                      String nextDialogName)

getStatus

public int getStatus()

launchWizard

public void launchWizard()

nextStep

public void nextStep(Object data)

setData

protected void setData(Object data)

getData

public Object getData()

finishWizard

protected void finishWizard()
Override this function to perform actions at the end of the wizard


failWizard

protected void failWizard(Throwable caught)
Override this function to perform actions in case of wizard failure

Parameters:
caught -

updateData

protected void updateData(Object object)
Override this function to update the data object from the result object of the dialog as well as to perform other functions like saving data to the server Default behavior overwrite the current data and no other action

Parameters:
object -

updateStatus

protected void updateStatus()
Override this function if we want to branch to a different dialog depending on the selection


cancel

public void cancel()
Cancel this wizard


previousStep

public void previousStep()
Called on a 'back'


getNextDialog

public String getNextDialog(String dialogName)