Quintiq file version 2.0
#parent: DataHolderLaneLeg
Response OnDataChanged () id:Response_DialogCreateEditFeedbackTrip_DataHolderLaneLeg_OnDataChanged
{
  #keys: '[146140.0.266892536]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  GroupServerCalls: true
  Precondition:
  [*
    return this.Data().Size() > 0
  *]
  QuillAction
  {
    Body:
    [*
      // This dataholder solve a problem with dialogs. When the user change an unit, a red cross was appearing on 
      // the dropdown list lane leg during a really short time. This is due the fact that we are setting
      // the dropdownlistlaneleg.data( null(LaneLeg ) ).
      // If the Dialog data does not persist in the lane leg selection of the new unit, auto select 
      // the first available lane leg. Else, keep the lane leg selection
      
      if( not isnull( DataHolderDialogData.Data().LaneLeg() ) )
      {
        if( this.Data().Find( DataHolderDialogData.Data().LaneLeg() ) < 0 )
        {
          DropDownListLaneLeg.Data( this.Data().Element( 0 ) );
        }
        else
        {
          DropDownListLaneLeg.Data( DataHolderDialogData.Data().LaneLeg() ); 
        }
      }
    *]
  }
}
