Author Topic: iWS Custom Model  (Read 3601 times)

Offline G.Olivier

  • Newbie
  • *
  • Posts: 3
  • Karma: 1
iWS Custom Model
« on: January 19, 2012, 08:46:22 AM »
Hi,

I have some problems when I tried to put a new Model in the Interaction frame on iWS.
I explain myself.
I use the method :
[quote]
container.RegisterType<ICaseDataViewModel, CustomCaseDataViewModel>();
[/quote]
This method allow me to put some data in the view "CaseDataView". But I have a problem. When I take a look in the log file, I have this :
[quote]
tomCaseDataViewModel - Get List CaseData
tomCaseDataViewModel - Get List CaseData
tomCaseDataViewModel - Get List CaseData
tomCaseDataViewModel - Set Interaction : interaction not null
tomCaseDataViewModel - Load CustomCaseDataView
[/quote]
This is strange because the Data was asked by the view before I can use the interaction.

So the question is : Is there someone who knows how use the ingooing interaction to display some information or how to force the view to update itself ?

Thanks in advance

Offline G.Olivier

  • Newbie
  • *
  • Posts: 3
  • Karma: 1
Re: iWS Custom Model
« Reply #1 on: January 20, 2012, 02:20:49 PM »
Hi,

I found a trick to correctly use the interaction in the InteractionFrame.

[quote]
container.RegisterType<ICaseDataViewModel, CustomCaseDataViewModel>(true);
[/quote]

With the bool to true, a singleton is done in the model so when iWS create the interactionframe, the interaction is known.

But the problem still the same with the toaster. If someone have an idea...

Thanks

Offline G.Olivier

  • Newbie
  • *
  • Posts: 3
  • Karma: 1
Re: iWS Custom Model
« Reply #2 on: January 25, 2012, 01:53:40 PM »
Hi,

I've finally finished my development. And it's working even with the toaster.

The thing is that you can called the function theView.Create(); This function recreates the entire view (I think). theView implements the ICaseDataView interface (I retrieved this object with the container).

If you take care to launch this function only once, you don't have any problem of infinit loop and the performance is good.