Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/Wizard"

(Description)
(Replaced content with "The Scout documentation has been moved to https://eclipsescout.github.io/.")
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{ScoutPage|cat=Client}}
+
The Scout documentation has been moved to https://eclipsescout.github.io/.
 
+
A wizard presents to the user with a sequence of {{ScoutLink|Concepts|Form|forms}} that allow him to work in a process driven approach on a task.
+
 
+
* implements: {{ScoutJavadoc|IWizard|I}}
+
* extends: {{ScoutJavadoc|AbstractWizard|C}}
+
 
+
== Description ==
+
A wizard contains of one ore more wizard steps. Each wizard step is typically bound to a form and responsible to start, show and save the form. If a form is started by a wizard step it will be opened inside a wizard container form. The top level system buttons of the form like Ok or Cancel will be hidden since the wizard container form will show wizard buttons instead. Such wizard buttons are Cancel, Next, Previous, Suspend and Finish.
+
 
+
A typical wizard step looks as follows:
+
 
+
<source lang="java">
+
@Order(10.0)
+
public class FirstStep extends AbstractWizardStep<FirstForm> {
+
 
+
  @Override
+
  protected String getConfiguredTitle() {
+
    return TEXTS.get("First");
+
  }
+
 
+
  @Override
+
  protected void execActivate(int stepKind) throws ProcessingException {
+
    FirstForm form = getForm();
+
    if (getForm() == null) {
+
      form = new FirstForm();
+
     
+
      // Start the form by executing the form handler
+
      form.startWizardStep(this, FirstForm.ModifyHandler.class);
+
     
+
      // Register the form on the step
+
      setForm(form);
+
    }
+
 
+
    // Set the form on the wizard
+
    // This will automatically display it as inner form of the wizard container form
+
    getWizard().setWizardForm(form);
+
  }
+
 
+
  @Override
+
  @Order(20.0)
+
  protected void execDeactivate(int stepKind) throws ProcessingException {
+
    // Save the form if the user clicks next
+
    if (stepKind == STEP_NEXT) {
+
      FirstForm form = getForm();
+
      if (form != null) {
+
        form.doSave();
+
      }
+
    }
+
  }
+
}
+
</source>
+
 
+
Wizards can be coupled with {{ScoutLink|Concepts|Workflow|Workflows}} on the server.
+
 
+
== Screenshot ==
+
<gallery>
+
Image:Scout Wizard.png|Wizard as Dialog in Web UI
+
</gallery>
+
 
+
 
+
== Properties ==
+
''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
+
 
+
{{note|TODO|Add a description of important properties. The idea is not to recreate the JavaDoc of the getConfiguredXxxxxx() methods but to provide explanations, best practice, example... Group the properties by domain.}}
+
 
+
 
+
== Events ==
+
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
+
 
+
{{note|TODO|Add a description of important events. The idea is not to recreate the JavaDoc of the execXxxxxx() methods but to provide explanations, best practice, example... Group the events by domain.}}
+
 
+
 
+
== See Also ==
+
* {{ScoutLink|Concepts|Form|Form}}
+
* {{ScoutLink|Concepts|Workflow|Workflow}}
+
* {{ScoutLink|Concepts|Client Plug-In|Client Plug-In}}
+

Latest revision as of 04:55, 14 March 2024

The Scout documentation has been moved to https://eclipsescout.github.io/.

Back to the top