Hello, I would like your ask your help regarding the nesting of components. I’ve found some documentation on this topic, but the part I’m struggling with is not really addressed there. The sources I’ve followed so far are this example on GitHub, this page in the documentation and this forum post. It seemed fairly straightforward to me at first, however the part that I can’t get to work is the part where I add the component to the form. In all my attempts I can seemingly add the childcomponent to the parent (with add > component → childcomponent), but when I do that nothing happens and nothing is added to the .frm either. At the moment we are using Servoy version 2022.3.4.
I’ve tried both my own component and the example component ‘nestedsimplecomponent’. In each case I end up with a becoming . As suggested in the post I read I’ve tried editing the .frm directly and adding the component that way. The furthest I’ve gotten is that I could see the component in the form outline and could seemingly edit its properties, however the component either wouldn’t load or would cause an error. When I tried the example component, this happened:
ERROR com.servoy.j2db.util.Debug - Cannot invoke "org.sablo.specification.PropertyDescription.getType()" because the return value of "com.servoy.j2db.persistence.IChildWebObject.getPropertyDescription()" is null java.lang.NullPointerException: Cannot invoke "org.sablo.specification.PropertyDescription.getType()" because the return value of "com.servoy.j2db.persistence.IChildWebObject.getPropertyDescription()" is null
My own component appears in forms like this and works just fine:
{
json:{
dataProvider:"tooltipText",
isInteractive:true,
location:{
x:1,
y:1
},
placement:"right",
theme:"default",
triggerAction:"click",
triggerElementSelector:".fa-times"
},
location:"1,1",
name:"tippytooltip",
typeName:"sam-tippytooltip",
typeid:47,
uuid:"00FCE133-E7B4-4C72-830F-5AE4BD88C6E0"
}
But when I follow the examples and try to add it to the component I want to use it in (directly via .frm), I get the following error when loading the form:
ERROR com.servoy.j2db.util.Debug - Can't convert '{"definition":{"dataProvider":"tooltipText","isInteractive":true,"location":{"x":1,"y":1},"placement":"right","theme":"default","triggerAction":"click","triggerElementSelector":".fa-times"},"location":"1,1","name":"tippytooltip","svyUUID":"B92D1053-D9DB-4DD5-AED6-AC6A6ED7B869","typeName":"sam-tippytooltip","typeid":47}' from design value to a form value as type: component
I’m sure something is wrong with my .frm structure or perhaps that something is missing in my component, but I can’t figure out what it is based on the available information. Could you help me figure out what it is, or is there an example available which demonstrates a fully working nested component that is used inside a form? If I need to provide any other information, let me know.