wizard conditionnally display OK button

StatusIDPriorityType
Closed32422BlockerQuestion
ProfileReply
YassineClient

Hello,
In final step of wizard, I want to activate or not the OK button according to some criteria.
I create step dynamically in code and between steps we can implement WizardNextStepCriteria but for the final step I don't know how to proceed
I use non persistent object in the wizard

Thanks
Yassine

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello Yassine!

If you want to change the activity of the OK button in the last step, you can do this via the WizardDialog Controller.
The controller has AcceptAction (OK button).
So that the button is not active at the last step you must set the flags value to false:

AcceptAction.Active["Allow"] = false;
AcceptAction.Active["Next not active"] = false;

Feel free to contact us if you need further assistance or have additional questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

YassineClient

Hi,
I try this but it doesn't work yet.
I deactivate AcceptAction in OnViewControlsCreated method but in final step the button always appears
Alternatively, I create a custom simple action that I want to place in final step, and it doesn't appear

Thanks
Yassine

MariyaVoytovichAgent

Hi!

Can you give me A small demo project, reproducing the problem?

Regards,
Mariya
On behalf of Xafari Client Services Team

YassineClient

I can't give the entire project, but this is the class concerned.
In brief, I want to deactivate the AcceptAction in final step when the (NonPersistentBlocNorme)CurrentObject.Reponse is false

Thanks,
Yassine

Attached files:
MariyaVoytovichAgent

In WizardStep exist property AllowOk. This property specifies whether button OK enable on the next view.

private void controller_CustomNextStep(object sender, CustomNextStepEventArgs e)
{
e.NextStep = e.CurrentStep.GetNextStep();
e.NextStep.AllowOK = false;
}

Regards,
Mariya
On behalf of Xafari Client Services Team

YassineClient

Finally I set ShowDefaultGoodbyeView to True, then I can check the value of object in last step before access to goodbye view

Thanks,
Yassine

MariyaVoytovichAgent

Hello Yassine!

Check the value of object in last step before access to goodbye view you can in CustomNextStep Event.

private void controller_CustomNextStep(object sender, CustomNextStepEventArgs e)
{
var nextView = e.CurrentStep.GetNextStep().View;
var wizardId =((ModelNode) controller.Model).Id;
if (nextView .Id == string.Format("Wizard_{0}_Goodbye", wizardId))
{
var obj = controller.CurrentObject;
//check object
}

Regards,
Mariya
On behalf of Xafari Client Services Team

× This ticket is closed.

Write US