Quintiq file version 2.0
#parent: PanelOrderLockHeader_545/RadioButtonGroupOrderLockHeader
Response OnChanged () id:Response_PanelOrderLockHeader_545_RadioButtonGroupOrderLockHeader_OnChanged
{
  #keys: '[412960.0.221843171]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebRadioButtonGroup_OnChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      existfilter := DataExtractorOrderLock.FixedFilter();
      if( existfilter = "true" ){
        existfilter := "";
        }
      existfilterlist := existfilter.Tokenize( " and " );
      
      newfilter := "";
      findcount := 0;
      traverse( existfilterlist, Elements, filter ){
        if( filter.FindString( "IsLocked()", 0 ) >= 0 ){
          if( this.BoundValue() = "locked" ){
            if( newfilter = "" ){
              newfilter := "( object.IsLocked() = true )";
              }else{
                newfilter := newfilter + " and " + "( object.IsLocked() = true )";
                }
            }else if( this.BoundValue() = "unlocked" ){
              if( newfilter = "" ){
                newfilter := "( object.IsLocked() = false )";
                }else{
                  newfilter := newfilter + " and " + "( object.IsLocked() = false )";
                  }
              }else if( this.BoundValue() = "all" ){
                newfilter := newfilter + "";
                }
          findcount := 1;
          }else{
            if( newfilter = "" ){
              newfilter := filter;
              }else{
                newfilter := newfilter + " and " + filter;
                }
            }
        }
      
      if( findcount = 0 ){
        if( this.BoundValue() = "locked" ){
          if( newfilter = "" ){
            newfilter := "( object.IsLocked() = true )";
            }else{
              newfilter := newfilter + " and " + "( object.IsLocked() = true )";
              }
          }else if( this.BoundValue() = "unlocked" ){
            if( newfilter = "" ){
              newfilter := "( object.IsLocked() = false )";
              }else{
                newfilter := newfilter + " and " + "( object.IsLocked() = false )";
                }
            }else if( this.BoundValue() = "all" ){
              newfilter := newfilter + "";
              }
        }
      
      DataExtractorOrderLock.FixedFilter( newfilter );
    *]
  }
}
