View Full Version : Going back to conditional dialog

07-26-2004, 02:06 AM
I have a Dialog that has a condition, based on user input, so when a user puts certain input in Dialog1 I can skip Dialog2 and go directly to Dialog3.

So far, when pressing "next" from Dialog1, Dialog2 was skipped accourding to plan (when it was needed) and got to Dialog3.
when pressing on "back" from Dialog3, I got back to Dialog2 (and it was not skipped as planned..), allthough the condition I have is on Dialog2 (in the event sequance)

Trying to work with a different approach, using the WizardTreeIterator gave a problematic result, since I did not find where I can catch the event for clicking the "back" button and manipulating it to skip dialogs.

How do I resoulve this problem ?

07-26-2004, 03:29 AM
Sorry but I do not have an answer to your question. I'm far behind you and I understood you have successfully managed to conditionally skip or not skip a certain dialog based on a selection a user made in a previous dialog. Can you explain me how you do it ... :o

Thanks allot.

07-26-2004, 05:04 AM

You should have seen it in the forum, it was posted before in a similar format... ;)

If you want to jump forward (or backward) after the user has clicked "next", than you can use this code in your queryExitDialog method (since it is called every time that button is pressed):
(you need to put this in a try-catch)
WizardBean beanPointer = arg0.getWizard().getCurrentBean();
WizardTreeIterator iter = arg0.getWizard().getIterator();
beanPointer = iter.getNext(beanPointer);// or getPrevious for backward

since the "back" button is giving me some problems , I cannot give you any intelligible advice.

07-26-2004, 05:26 AM
Thanks for your reply.

But isnt it possible to use a condition on a sub sequence to get a simillar result with out the need of coding ?

07-27-2004, 04:10 PM

You should be able to accomplish what you want by using a condition on Dialog2 without using a code event. If the condition evaluates false, it should be skipped whether the dialog is traversed in the forwards or backwards direction. What is the condition that you are using? Is it possible that the condition has changed from being true to false when the user clicks Back?

07-28-2004, 06:07 AM

You are right, I was making a mistake, now I am using a condition on my dialog and now all works well.

My initial mistake was that I assumed that $V() condition should work, and it does not.
It could have had some connection to the fact that I have upgraded an old project, but since the matter has been solved I will not put too much effort in it...

I have solved this problem by using System.setProperty() and $J() in the condition.

I Thank you for your help,

07-26-2006, 02:41 PM
JDUnicorn or Brianl or any other Gurus!

Can you please let me know why $V doesn't work in a condition for the dialog and also more details on how to use the $J resolver? I am in a process of developing conditional sequencing but the usage of $V doesn't seem to help me branch (or not branch) to the next dialog at all :(


07-27-2006, 07:28 AM

Why doesn't it work in the dialogs I do not know.... I have not touched this for a long time now, so I cannot give U a concrete answer

How I solved it (in more details - though I thought it was clear):
- In a dialog where I am setting a variable, I wrote in the dialog
System.setProperty("dialogShouldBeSkipped", "true");

- In another dialog, the one that should have been skipped I wrote in the string comparison condition ($J(dialogShouldBeSkipped) must not match true

I think U can use this also for branching

I hope this helps