Web wizard

StatusIDPriorityType
Closed24650CriticalBug
ProfileReply
Γρηγορης ΤσολακιδιςClient

I am trying to use the wizard feature of your framework. Having followed the example on the support page I created a separate module to test it. Added a new controller with the required logic and a class to use with the wizard (domaincomponent attribute applied not stored in db – at first tried a simple non xaf class but wizard produced exceptions). All customizations like steps, views etc in modeldifferences.

I tried to call the wizard from a simple action and in fact it is called. The problem is that in the popupview I only get the cancel button although while debugging the accompanied controller had all actions (dialogok, dialogcancel, dialogclose and wizardnext, wizardback) listed and enabled. Also checked the checked in my code frame, context and popupwindowmanager in case something disables them but no.

Any thoughts? Could it be that I am using a domaincomponent and not a fully EF object? Can I use a simple class as the base for the wizard? As I am sending you this ill try to make an example with a complete xaf class for testing.

I also incude the sources for the specific wizard. It cannot work standalone as it is part of a larger project with many modules but you ll get the idea.

Action saDeletedUndo.Execute calls SetupWizardShowViewParameters that creates the wizard. The controller returned from XafariModule.CreateWizardDialogController has all actions but in displayed popup only cancel is active.

Attached files:

Replies

UserDescriptionPosted On
Sasha (Xafari Support)Client

Hello Grigorius,
We researched your attached sample and tried to repeat your issue with actions (dialogok, dialogcancel, dialogclose and wizardnext, wizardback).
But we get buttons wizardnext, wizardback.

Please, can you test this piece of the code?

private void SaDeletedUndoExecute(object sender, SimpleActionExecuteEventArgs e)
{
...
if (!UndoActionCheckCodeUnique(currentObjectType, currentObject))
{
SetupWizardShowViewParameters(e.ShowViewParameters, Application.Model.Xafari().Wizards.GetWizard("waUndoDeleted"));
return;
}
...
}

If this piece of the code is active, please, give us the design of the interface IDcSoftDelete.

 

Regards, Sasha.

Γρηγορης Τσολακιδις

Code is active and executes ok. I am attaching some screenshots for you to see. Also the interface has a simple IsDeleted property. I am including its definition in the zip also. Hope tpo hear from you soon.

Reagards
Greg

Attached files:
Sasha (Xafari Support)Client

Hi,

Thanks for the provided information. We are going to investigate it.
It will take some additional time.

Regards, Sasha.

Sasha (Xafari Support)Client

Hello,

To use Wizard in Web application, you need override CreateShowViewStrategy method in your WebApplication.cs:
public partial class ...AspNetApplication : WebApplication
{
...
protected override ShowViewStrategyBase CreateShowViewStrategy()
{
return new XafariShowViewStrategy(this);
}
}

Please inform us of your results.
Regards, Sasha.

Γρηγορης Τσολακιδις

Hello Sasha,

Unfortunately i have already implemented the suggestion as i followed your guide step by step. The only difference is that all xafari related code is not in module or module.web but a new one i created for the test. I don't think this is a cause for error since this is exactly the reason behind module design in XAF, to isolate related code.

Either this is a bug with the wizard or my use case has something not taken into account in the implementation and/or documentation of the wizard.
I really cannot understand it as every debug/test has related controllers and actions fired correctly as can be seen by the screenshots i send you before.

Regards
Greg

Sasha (Xafari Support)Client

Hi,

Thanks for your answer, we are working on your issue and will get back to you as soon as we can. Please bear with us.

Regarda, Sasha.

Γρηγορης Τσολακιδις

Good morning Sasha,

Any updates on the issue?

Regards,
Greg

Sasha (Xafari Support)Client

Hi Greg,

I send you sample Wizard_Ticket. This sample is based on your additional information, but I changed SetupWizardShowViewParameters() method because I have error when creating new DcDomainCodeEntity object.
And you can see some notes in UndoWizardForDeletedEntitiesViewController.

Additional info: DevExpress v15.1.7, Xafari v15.1.708...
Please, check the sample and inform us of your results.

Regards, Sasha.

Attached files:
Γρηγορης Τσολακιδις

Hello Sasha,

Your example works. Strange thing is that i cannot see any difference between your code and mine apart from the fact that you use XPO and i use EF. Is there any restriction to the use of Wizards? Maybe wizard templates are not loaded if not using XPO?

I also tried to create a very simple solution based on yours but using EF (without classes) and a domain component class TestClass1 as my base object (with a NotPersistentObjectSpaceProvider). I copied the controller logic and created the wizard in the model but when code tries to find it there is an exception that Model.Xafari.Wizard node is null. Can you please check my solution?

Attached files:
Sasha (Xafari Support)Client

Hi,

Thank you for your additional info and answer.
I am going to investigate it.

Regards, Sasha.

Sasha (Xafari Support)Client

Hello Greg,

Thanks for your last remark about the issue with Wizard and EF.
We are going to fix the issue in next versions of Xafari and inform you about it.

To fix this problem you can replace a Class_DetailView for steps clones of this Class_DetailView (see attached file).

Let me know if you need further assistance.
Regards, Sasha.

Attached files:
Γρηγορης Τσολακιδις

Hello Sasha,

Sorry for the late reply but i have been engaged in something else and could not get back to you sooner.

Unfortunately your video did not help. I copied the detail views but the error (empty Xafari() node in model at runtime) still persists.
No point using it until these errors or peculiarities are worked out.

Please inform me if there is any further development or solution in the future. In any case please include if possible a test use case solution for a web project using EF and a wizard displaying several detail views of a non persisted entity.

Regards,
Greg

Sasha (Xafari Support)Client

Hello Greg,

We thank you for your letter.

We registered the issue [102.149032] in our issue tracking system. You may reference to this number later to find out its state.

Thanks,
Sasha.

Γρηγορης Τσολακιδις

Hello Sasha
Is this fixed in your new release?

Vitali YazvinskiClient

Hello Greg.

Thank you for your patience.
Unfortunately it has not been fixed yet.
We are working on solving this issue and it will be fixed on the following Xafari build.

Best regards,
Vitali

Sasha (Xafari Support)Client

Hello Greg,

The Web wizard issue was fixed in latest Xafari Framework build - 15.2.408.651.

Please inform us of your results.

Best regards,
Sasha.

Γρηγορης Τσολακιδις

Hello again,

Due to vacation and extra time needed to migrate to devexpress 15.2 i have delayed testing the new version of xafari framework. I installed it today and upgraded the references but i still receive NullReferenceException when trying to access Application.Model.Xafari().Wizards. So i cannot proceed to test the displayed popup. The Wizards node is seen fine in the model editor but in code it raises the exception.

Please advice what to do.

Γρηγορης Τσολακιδις

OK ignore the above comment. It seems i have commented the XafariShowViewStrategy part in the WebApplication code.After i restored it i no longer have this error.

But we are back to the original problem (check first post in ticket). The displayed popup view only has the cancel button. It is exactly the same behavior as the previous version.

What gives?

Sasha (Xafari Support)Client

Hi Greg,

Please, inform us of your results for your last sample (attached file Solution2.zip - see above).

Thanks, Sasha.

Γρηγορης Τσολακιδις

Update on the issue. I have tested with the included solution and it works. But when i use it in my full solution i have the same problem. Apart from missing the 2 buttons (back, next) i also miss the layout in the header. In one case i get the blue bold header with the name of the current step (Solution2) and in the full project i get the default view name in XAF without any background or bold font. So my guess is that something prevents the wizard from loading its template or view strategy?!

In an effort to simplify changes i moved TestClass1 code from solution2 to current project but i get the same results. All related wizard code between solutions is the same down to the line. Same domaincomponent class, same detail views, same wizard settings in model, same code in wizard controller. Only different thing in my full solution is that i have an active db connection with EFObjectSpace and of course many detail window & viewcontrollers doing things for list, details and objectspaces. But i think that the part that shows the popup window in wizard (SetupWizardShowViewParameters()) should be self contained and not dependent upon other active controllers. ill send a zip file soon with the relevant files in solution2 and full project if you can compare and find anything. i would like to send the whole project but a db connection is also needed. i will also send the two logs up to the point i open the wizard and screenshots to show the differences. Hope we will find something.

Γρηγορης Τσολακιδις

Posting the files mentioned in my previous reply.

Attached files:
Sasha (Xafari Support)Client

Hi,
Thanks for the provided information, Greg. We are going to investigate it. Give us some time.

Best regards,
Sasha.

Sasha (Xafari Support)Client

Hello Greg,

Please read the following instructions:

- to set key EnableDiagnosticActions = True in Web.config:
WebConfigEnable

- to run your application and select for the wizard window Diagnostic -> Actions Info:
WizardStep

- to investigate the log for the wizard window:
Diagnostic

If you can not find a reason of the problem, send us the log.

Let me know if you need further assistance.
Thanks, Sasha.

Γρηγορης Τσολακιδις

Hello Sasha,

Ok i enabled the diagnostic actions and run the action info. I can clearly see that (among a great number of controllers and actions) at the end there are both Wizard_Next and Wizard_Back action both active and one enabled as per your screenshot. But no buttons. I am attaching the log plus a screenshot for you to view.

Greg

Attached files:
Sasha (Xafari Support)Client

Hi Greg,

This issue with the Xafari Wizard arise because you are using your own DialogTemplateContent (see file Global.asax.cs) and the DialogTemplateContent overlaps Xafari Wizard templates.

You can pay attention to it when you create your CustomizeTemplate.

Thanks, Sasha.

Γρηγορης Τσολακιδις

Hello again Sasha,

Indeed after removing our custom dialog templates the wizard loaded correctly. For now we wont use any custom templates but it would be nice if we could still have that ability without breaking the wizard in the future.

As for the immediate concern. In my continued testing i encounter a new issue. Wizard is loaded fine and CustomNextStep and CustomizaeNextView events are fire correctly but then (all this when pressing next button but on cancel also) i get a javascript exception in http://localhost:7470/WebResource.axd?...
with message '0x800a1391 - JavaScript runtime error: 'ClientParams' is undefined'. Stack trace indicates that this is a devexpress exception rather than xafari but it still prevents wizard from doing its job. I am starting to suspect that 15.2 has some javascript issues as i encountered another similar case (but not the same) using the new html5 report viewer and devexpress label it as but pending fix. Have you encountered anything similar? Any suggestions to fix/avoid it so i can integtrate wizard into our app?

Below is the code that throws it

function ProcessMarkup(callbackResult, processScripts) {
if (callbackResult.cpClientInfo) {
ClientParams.Clear();
var clientInfo = JSON.parse(callbackResult.cpClientInfo);
for (var key in clientInfo) {
ClientParams.Set(key, clientInfo[key]);
}
}

and here is part of the xaf log

26.01.16 12:12:25.938 phziklxaqks0wzsib5bu44qa Type: DevExpress.ExpressApp.Actions.SimpleAction
ID: WizardNext
Category: WizardActions
Controller.Name: Xafari.Web.WebWizardDialogController
Context.Name: Undo Deleted Record Parameters Step1
Context.IsRoot: True
Context.SelectedObjects.Count: 1
Context.CurrentObject: DCFramework.FilterFeature.Module.BusinessObjects.UndoDeletedParameters

26.01.16 12:12:25.984 phziklxaqks0wzsib5bu44qa Action 'WizardNext' done
Unhandled exception at line 847, column 3 in http://localhost:7470/WebResource.axd?d=vTHACo8ymh56b07R2nmYThNHOBiiU3JOHbRHgN1ZbT1yUKJhSo-VqBAKssXkKuSxs4CjAkxdjLwAO5WcifrrY_mPpINzqVx_0fCLoekZKM2FlX-35XHBDzzAUI5bPZwudq-N7R6k1xhV8ah8mYKCmFoggxvhHUQxnMhl9FdJaIkh7_bZOYlDp5Q1cFx6UbEe8Fk5BUDg0M0we6eet2MO0UkO7gAviyMv6MNvKy7Y_h81&t=635893982350156892
0x800a1391 - JavaScript runtime error: 'ClientParams' is undefined

Sasha (Xafari Support)Client

Hi,

Thank you for the information. We are working on your issue and will get back to you as soon as we can.

Regards, Sasha.

Vitali YazvinskiClient

Hello Greg!
Sorry for the late answer.
I've analized your problem and I haven't got any problem with javascript that has been described by you.
I've used Xafari's build 15.2.508.709. You can try to use this build to check if there is the problem.
If you have some aditional questions, please create a new one ticket and don't forget to put the test project if there is an error in it.
This ticket will be closed.
Thank you for your patience.
Best regards, Vitali.

× This ticket is closed.

Write US