I am trying to use the automatically generated uischema through only the schema.
Using some simple schema as an example below, the input field for ‘name’ can be rendered, but below that the long description object just shows ‘No applicable renderer found.’
'description': "The task's name"
'title': "Long Description",
I am just copying the vue2 seed example on how they declare renderer in my example:
(jsonforms-vue-seed/App.vue at vue2 · eclipsesource/jsonforms-vue-seed · GitHub)
const renderers = [
// here you can add custom renderers
Am I doing something wrong? Should I be using a custom renderer? I know I can probably build a uischema manually to create the form properly, but I want to avoid that if possible
the problem is that we don’t offer an
object renderer at the moment, see also here. The ui schema generator just generates a
Control for each property including
description. The rendering then “fails” as there is no renderer handling the
type: "object" schema.
To solve this you can implement your own
object renderer which should be rather straightforward. You can basically copy the GroupRenderer, connect it with the useJsonFormsControlWithDetail composition (therefore also use
control instead of
layout to refer to the computed props) and use
findUiSchema to find or generate the sub ui schema, like in the React Material object renderer.
thanks a lot for the reply.
so since renderer do not support object, if I don’t create a custom one, but instead specify the uischema dynamically (i.e. parsing and storing properties found in schema manually, then create a function to push each properties as the ‘scope’ into the elements array within uischema)
I assume that will also do the job the same? Is that correct?
Thanks in advance
Yes absolutely. As a starting point you can copy the generator code from JSON Forms and adapt it to your needs.
did someone meanwhile implement such a generic object reanderer?
Hi @bwl21, not yet for the Vanilla renderer set, however the
@jsonforms/vue2-vuetify has such a renderer.
@sdirix thank you very much for the hint. Can I use this with with vue3 as well. I started my project with the jsonforms-vue-seed.
Sadly no. Vuetify for Vue 3 is a complete rewrite and not compatible to Vue 2. So we probably need a complete new renderer set, i.e.
@jsonforms/vue-vuetify for this.
I’m new with VUE3 and jsonForms so a simple question:
is there any example or tutorial out there how to implement a own control renderer in due-vanilla (VUE3)?
Please create a new question instead of adding to an existing one.
There is no difference between custom renderers and the off-the-shelf renderers. So feel free to look through the code base. You might want to copy an existing one and modify it to your liking to get going (e.g. a password-string renderer). There is also a more detailed guide as part of the Vue readme, see here.