Author Topic: How can I modify the view in the UpdateCaseData region in WDE?  (Read 3092 times)

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
How can I modify the view in the UpdateCaseData region in WDE?
« on: January 25, 2017, 12:44:38 PM »
I have been told to make a change to the UpdateCaseData region in WDE so that a function runs when the user clicks on a link.

I found out that this view is an instance of GenericDataView, but [b]how can I create a new view that does everything the old one did, but has this extra functionality[/b]?

I can't just make the new view from scratch because GenericDataView has too many things I don't want to lose.

Any ideas?

Thanks in advance.
« Last Edit: January 25, 2017, 04:08:03 PM by Gabi »

Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Re: How can I modify the view in the UpdateCaseData region in WDE?
« Reply #1 on: January 26, 2017, 04:32:45 PM »
What part exactly of the screen?

CaseData? CaseInformation?

Screenshot explaining what are u trying to do will be very usefull.

Regards.

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
Re: How can I modify the view in the UpdateCaseData region in WDE?
« Reply #2 on: February 06, 2017, 06:59:46 PM »
The UpdateCaseData region (Case Information) is inside the CaseData region. I would like to be able to add something to it (like a button) without losing what's already in there.

[img]https://s30.postimg.org/tba8xswu9/sample.png[/img]

I would like to either add a component where the red line is, add a view right under that one, or modify that view so that I can run some code whenthe user clicks on an URL.

Does anyone know how to do any of those things?
« Last Edit: February 07, 2017, 12:28:58 PM by Gabi »

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: How can I modify the view in the UpdateCaseData region in WDE?
« Reply #3 on: February 09, 2017, 04:59:27 PM »
Gabi,

You would build out the UI component you w anted to build (like a button or something).  Then you would register its view/viewmodel and  add it to the view you are talking about like this (in the main Initialize() method):

I am typing this by hand, there might be a typo:
[code]
public void Initialize()

container.RegisterType<IYourControlView, YourControlView>();
container.RegisterType<IYourControlViewModel, YourControlViewModel>();

viewManager.ViewsByRegionName["UpdateCaseDataRegion"].Add(
new ViewActivator()
{

ViewType = typeof(IYourControlView),
ViewName = "MyCustomView"
});
[/code]

If you reference WDE API docs you will see you can also utilize .Insert method instead which can potentially help you decide if the tool shows up at top or bottom of the region.

Regards,
Andrew

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
Re: How can I modify the view in the UpdateCaseData region in WDE?
« Reply #4 on: March 12, 2017, 02:15:20 PM »
Than you for your attempt to help by quoting the manual, but I read that long before I posted this thread, and the example in the manual does not work in this case. The UpdateCaseData region is not a MultiView region, and thus does not support the addition of new views. It [i]can[/i] be replaced entirely, but that would mean building a clone of it plus my modifications, which is a futile effort (Genesys does not make it easy for people to clone its components). I have given up on this by now, and I am working with other regions instead.

Perhaps you can still help me add a view to [url=http://www.sggu.com/smf/index.php/topic,10208.0.html]this other region[/url].

I suppose this can be closed now, since no solution will be found.
« Last Edit: March 12, 2017, 02:18:27 PM by Gabi »