renhao
2023-09-21 1aa9f2bb83dd9e4b7517f1cbf06b0db53979bb31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Quintiq file version 2.0
#parent: lstSubscribers_529
Response OnSelectionChanged (
  LibCal_Calendar selection
) id:Response_lstSubscribers_529_OnSelectionChanged
{
  #keys: '[146730.0.1578053342]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      // Initialize the list by setting the checkmark for the subscribing calendars when this has not been done before.
      // This should only be done when OnSelectionChanged is executed for the first time.
      if( lblIsInitialized.Text() = "false" )
      {
        // Get the calendars of the subscriptions.
        calendars := selectset( dhEvent.Data(), LeadingParticipation.Subscription.Calendar, calendar, true, true ).Unique();
        
        traverse( calendars, Elements, subscriber )
        {
          lstSubscribers.ExtendCheckByKey( subscriber.Key() );
        }
          
        // Register that the list has been initialized.
        lblIsInitialized.Text( "true" );
      }
    *]
    GroupServerCalls: false
  }
}