Author Topic: WDE example check box  (Read 3770 times)

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
WDE example check box
« on: November 29, 2015, 10:19:41 AM »
Hi to everyone!

I've tested the Genesys WDE sample code for disposition code. Into this sample, the view was developed to implement the check box for disposition code selection instead of the radio buttons, but it doesn't work because it show me always the radio buttons.

Can anyone help me?

Thanks a lot.
« Last Edit: November 29, 2015, 11:36:12 AM by Daere »

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: WDE example check box
« Reply #1 on: November 29, 2015, 07:53:50 PM »
Did you check the logs to find out if the module was loaded and used properly?

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: WDE example check box
« Reply #2 on: November 30, 2015, 02:23:57 PM »
Hi,
into the log there aren't error, but in WDE 8.5 developer's guide, at page 157 it's explain how replace the disposition code view with check box. In the sample "Genesyslab.Desktop.Modules.ExtensionSample" there is the DispositionCodeExView.xaml that contains radio button implementation instead of check box.
Why the guide contains a check box example that it's not developed and how can I develop the check box feature?

Thank you so much.  ;D

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: WDE example check box
« Reply #3 on: November 30, 2015, 03:22:41 PM »
Idea is you to replace the existing view with yours. The original code of radio button obviously doesn't exist as it is embedded on the WDE. You need to create yours and replace existing one. That is explained on docs.

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: WDE example check box
« Reply #4 on: November 30, 2015, 03:59:09 PM »
If you want checkboxes change the DispositionCodeExView.xaml

from:


<RadioButton IsChecked="{Binding IsSelected}" GroupName="DispositionCodeGroupName" Click="radioButton_Checked" ToolTip="{Binding Description}">
    <TextBlock Margin="5,0,0,0" Foreground="{DynamicResource SilverBorderColorBrush}" Text="{Binding DisplayName}" />
</RadioButton>

to:

<CheckBox IsChecked="{Binding IsSelected}"  Click="radioButton_Checked" ToolTip="{Binding Description}">
    <TextBlock Margin="5,0,0,0" Foreground="{DynamicResource SilverBorderColorBrush}" Text="{Binding DisplayName}" />
</CheckBox>

Offline Daere

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: WDE example check box
« Reply #5 on: November 30, 2015, 05:04:12 PM »
[quote author=PeteHoyle link=topic=9234.msg41589#msg41589 date=1448899149]
If you want checkboxes change the DispositionCodeExView.xaml

from:


<RadioButton IsChecked="{Binding IsSelected}" GroupName="DispositionCodeGroupName" Click="radioButton_Checked" ToolTip="{Binding Description}">
    <TextBlock Margin="5,0,0,0" Foreground="{DynamicResource SilverBorderColorBrush}" Text="{Binding DisplayName}" />
</RadioButton>

to:

<CheckBox IsChecked="{Binding IsSelected}"  Click="radioButton_Checked" ToolTip="{Binding Description}">
    <TextBlock Margin="5,0,0,0" Foreground="{DynamicResource SilverBorderColorBrush}" Text="{Binding DisplayName}" />
</CheckBox>
[/quote]

Hi Peter,

I've made the change that you've indicated into the ExtensionSample at the DispositionCodeExView.xaml and leaving the rest of code unchanged.
The problem is that into the Disposition View it's not allowed to select more than one Disposition Code because the tick select only one Disposition code and if I try to check another Disposition Code the previous one will be deselected. The tick is also not visible.

This is the method into the DispositionCodeExView.xaml.cs:

[code]private void radioButton_Checked(object sender, RoutedEventArgs e)
        {
            interaction = Model.Interaction;

            if (isEnabledChangeAttachedData)
            {
                if (Model.Interaction != null)
                    if (Model.Interaction.DispositionCode.SelectedDispositionCodeValue != null)
                    {
                     
                      interaction.SetAttachedData(interaction.DispositionCode.CodeKeyName, interaction.DispositionCode.SelectedDispositionCodeValue.Name);
                                          }
                    else
                        interaction.RemoveAttachedData(interaction.DispositionCode.CodeKeyName);
            }
        }
}[/code]

Thank you

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: WDE example check box
« Reply #6 on: November 30, 2015, 05:46:22 PM »
Disposition codes by definition should be one only. Maybe you can create another listbox to provide what you are trying to do