-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a WASM example #16
Comments
Hi, I need implement this feature but in my WASM project. |
Hi |
Aah I see what you are trying to accomplish. That is indeed the usecase for the expando object. However #5 is on the roadmap, here the idea is that the ExpandoObject will be deprecated, in favour for a JSON based schema. (this should be more a less a serialized object containing Built-in classes. Like the VxFormElementLayoutAttribute and the ValidationAttributes) {
"nameOfProperty": { // name of the property
"attributes":
{"MinLength": { "Length": 5 },
"Required":{},
"VxFormElementLayout": { // VxFormElementLayoutAttribute
"label": "",
"order": 0
}",
}, // Attributes
"type": "String", // Or a custom type
"value": "The value of the property" // could be a complex type
}
}
// Following this approach it is easier to parse and we could create nested objects as well, supporting VxGroup etc.. Under the hood there is a converter that use a 'empty' base class, where the properties would be added dynamicly via reflection. This also allows to construct an object with reflection added attributes, so no need for the component to handle the expandoobjects anymore. It is just an annotated object this way, removing complexity in the component and easier external definition storage. so... to make a long story short: I recommend you try the described approach up here. Otherwise use the expando object way, but that doesn't support validations... Feel free to add an concept of your solution in the issue #5 so we can discuss your proposed implementation . It would be nice if you could take issue #5 some steps further. |
ok I'll take your recommendation and try to dynamically build an object through reflection |
By popular rquest add a WASM example.
VxFormgenerator should support WASM.
The text was updated successfully, but these errors were encountered: