Open hedandan1989 opened 1 week ago
<PackageReference Include="System.Interactive" Version="6.0.1" />
<PackageReference Include="System.Interactive.Async" Version="6.0.1" />
add it in your Blazor project and let me know if it worked
after adding these packages to your project rebuild your solution. To see Model Editor again you also need restart visual studio
Thank you. After installing specific packages, there were no more error messages. But a new issue arose, the uploadpropertyeditor was not displayed in model.xafml, and even if I specified the editor in the code, it still wouldn't work. After opening the page, it is still a regular listview.
here is the code. `[DefaultClassOptions] [DefaultProperty(nameof(Name))] public class Emplyee : BaseObject { public Emplyee(Session session) : base(session) { }
string fName;
[Size(SizeAttribute.DefaultStringMappingFieldSize)]
public string Name
{
get => fName;
set => SetPropertyValue(nameof(Name), ref fName, value);
}
[PersistentAlias("EmployeeDatas.Count")]
[EditorAlias(nameof(DisplayTextPropertyEditor))]
public int FileCount => (int)EvaluateAlias();
[Association("Emplyee-EmployeeDatas")]
[EditorAlias("UploadFilePropertyEditor")]
public XPCollection<EmployeeFileData> EmployeeDatas
{
get
{
return GetCollection<EmployeeFileData>(nameof(EmployeeDatas));
}
}
}
//[DefaultClassOptions] public class EmployeeFileData : FileData { public EmployeeFileData(Session session) : base(session) { }
Emplyee fEmployee;
[Association("Emplyee-EmployeeDatas")]
public Emplyee Employee
{
get => fEmployee;
set => SetPropertyValue(nameof(Employee), ref fEmployee, value);
}
}`
here is the screenshot,there is no uploadpropertyeditor.
here is the sample. DXApplication5.zip
probably some breaking change in the Xaf code or improvment. In any case you can workaround it like
public IEnumerable<IFileData> Datas => EmployeeDatas;
also if u have the time u can create your custom editor without any implementation mark it with [PropertyEditor(typeof(IEnumerable<IFileData>),EditorAliases.UploadFile, false)]
, create a sample and ask in DX support center explaining to them that the time I recorded the video in the wiki it was working
๐๐ฒ๐๐ฐ๐ฟ๐ถ๐ฏ๐ฒ ๐๐ต๐ฒ ๐ฏ๐๐ด An error occurs when updating Model. xafml while using Upload File Property Editor.
๐ง๐ผ ๐ฅ๐ฒ๐ฝ๐ฟ๐ผ๐ฑ๐๐ฐ๐ฒ
RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.Blazor.BlazorModule));
Here is he demo. DXApplication4.zip