Opened 15 years ago

Closed 14 years ago

#1639 closed enhancement (fixed)

[patch] [CLA needed] Improve in wizard widget for checkPass function

Reported by: [email protected] Owned by: dante
Priority: low Milestone: 1.1
Component: Dojox Version: 0.3
Keywords: Cc: [email protected]
Blocked By: Blocking:


checkPass of Wizard wait for the error string and display alert. For create own error alert i make some changes (see patch below) Now checkPass can return string (old logics) or false.

diff -ur dojo-0.3.1-core/src/widget/Wizard.js dojo/src/widget/Wizard.js
--- dojo-0.3.1-core/src/widget/Wizard.js        2006-06-13 01:19:37.000000000 +0400
+++ dojo/src/widget/Wizard.js   2006-10-12 13:05:45.000000000 +0400
@@ -192,10 +192,12 @@
        checkPass: function() {
                if (this.passFunction && dojo.lang.isFunction(this.passFunction)) {
                        var failMessage = this.passFunction();
-                       if (failMessage) {
+                       if (typeof(failMessage) == 'string') {
                                return false;
+                       if (typeof(failMessage) == 'boolean')
+                          return failMessage;
                return true;

Change History (8)

comment:1 Changed 15 years ago by dylan

Milestone: 0.4.1

comment:2 Changed 15 years ago by bill

Cc: [email protected] added
Summary: Improve in wizard widget for checkPass function[patch] [CLA needed] Improve in wizard widget for checkPass function

Sorry, I don't see the purpose of this change. Can you give an example of when you would use a boolean fail message?

comment:3 Changed 15 years ago by guest

<div id="wizard1" dojoType="WizardContainer">
   <div dojoType="WizardPane" passFunction="sw_select">

function sw_select() {
   // some checks
   if (ckecks == false) {
       // return "Wrong data entered in tab" // alert message - it's not good
       dojo.byId("error_message").innerHTML = "Wrong data entered in tab";
       return false;
   return true;

comment:4 Changed 15 years ago by bill

Component: WidgetsDojox
Milestone: 0.9

comment:5 Changed 14 years ago by dylan

The Wizard widget was removed from Dojo 1.0 as most of its functionality can be attained through the various layout widgets. Is this something that should be kept open?

comment:6 Changed 14 years ago by bill

Hmm, I never intended the layout widgets to replace Wizard, I just didn't think that Wizard should be part of Dijit.

comment:7 Changed 14 years ago by dante

Milestone: 1.1
Owner: changed from bill to dante
Status: newassigned

comment:8 Changed 14 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [11823]) initial port of Wizard widget from 0.4 turns out to be a gutting. Using stack container, was able to remove most of the internal logic, and fix a few things along the way. fixes #1639 and fixes #1639 ... buttons are now dijit.form.Buttons, though still needs localization

Note: See TracTickets for help on using tickets.