public PickerReadOnlyObject(string name, string title, string stringFormat, DropDownTemplateDescriptor dropDownTemplate, IContextProvider contextProvider) : base(name, dropDownTemplate.TemplateName, contextProvider.UiNotificationService)
 {
     this._dropDownTemplate = dropDownTemplate;
     this.httpService       = contextProvider.HttpService;
     _defaultTitle          = title;
     _stringFormat          = stringFormat;
     this.Title             = _defaultTitle;
     this.mapper            = contextProvider.Mapper;
     GetItemSource();
 }
Exemplo n.º 2
0
 public PickerValidatableObject(string name, T defaultValue, DropDownTemplateDescriptor dropDownTemplate, IEnumerable <IValidationRule> validations, IContextProvider contextProvider)
     : base(name, dropDownTemplate.TemplateName, validations, contextProvider.UiNotificationService)
 {
     this.defaultValue      = defaultValue;
     this._dropDownTemplate = dropDownTemplate;
     this.httpService       = contextProvider.HttpService;
     this.Title             = this._dropDownTemplate.LoadingIndicatorText;
     this.mapper            = contextProvider.Mapper;
     GetItemSource();
 }
Exemplo n.º 3
0
 private IValidatable CreatePickerValidatableObject(FormControlSettingsDescriptor setting, DropDownTemplateDescriptor dropDownTemplate)
 => ValidatableObjectFactory.GetValidatable
 (
     Activator.CreateInstance
     (
         typeof(PickerValidatableObject <>).MakeGenericType(Type.GetType(setting.Type)),
         GetFieldName(setting.Field),
         ValidatableObjectFactory.GetValue(setting),
         dropDownTemplate,
         GetValidationRules(setting),
         this.contextProvider
     ),
     setting
 );