Genesys CTI User Forum > Genesys-related Development

Create/add own button to existing view.

<< < (2/4) > >>

Kubig:
I do not see any reason for iterating the existing view. You can directly add your custom view into existing region through the ViewManager. You just need to load your module after the ContactModule is loaded, thus why you cannot insert view right now as you trying to insert it so early.

I use ContactTabBottomHistoryMultiRegion region is several projects and never have encountered any issue on that.

MJaskowski:
My guess is I try too early to load my view that's why I made own event but this is wrong way. Did you do the same way or do you load view by other method? I can't catch where I am wrong.
Any keywords?

If I add ViewActivator by own event (when I have and I see ContactInfoHistoryMultiRegion region) then my view isn't visible, should I use any method or something yet?

MJaskowski:
[quote] You just need to load your module after the ContactModule is loaded [/quote]

How can I catch it? By event? Could you expand thought?


PeteHoyle:
Hi Matt,

In initialize method try using the viewManager.AddViewsToRegion method, then you don't need to wait for the region to already exist:


[code]            viewManager.AddViewsToRegion("ContactTabBottomHistoryMultiRegion", new List<ViewActivator>() {
                new ViewActivator()
                {
                    ViewType = typeof(ICancelRecordView),
                ViewName = "MyView",
                ActivateView = true,
                ActivateOrder = 30
                }

            });[/code]

MJaskowski:
Pete!

You are an amazing guy! Thank you so much. Such a small change, and allowed me to do it the way I wanted. I understand that the AddViewsToRegion method creates a non-existent region? Something like a placeholder?

Thank you for your knowledge, again!


Matt

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version