Nested Custom Widgets (Bonita 7)

1
0
-1

I've created a custom widget that I would like to use in another custom widget. I know custom widgets are created as angualr directives so in theory I should be able to reference them in the template of my other widget:

<div>...my template code
<custom-my-widget></custom-my-widget>
</div>

But I don't know how to reference the .js for my inner widget or how the properties get set on the scope of that inner widget.

Is this possible?

Thanks David

Comments

Submitted by vincent.elcrin on Thu, 07/30/2015 - 00:04

Hi again. Tough one. Custom widget are really not designed to be nested inside each other. There could probably be ways to do so but it would be pretty hacky. Mind if I ask first what you intend to do? Vincent

Submitted by dharris on Thu, 07/30/2015 - 16:27

Basically I have a widget that generates a table which I use in several places.

I'm using the community edition and don't have access to fragments and I have a set of controls that need to be on numerous pages so I was making a widget to hold all of those controls and act sort of like a fragment would. I was hoping to pull in my table widget into my fragment like widget.

Submitted by vincent.elcrin on Thu, 07/30/2015 - 17:02

You would have to share all properties between both widgets to get something working. Something to do with the way we bind page variables to widget properties. Anyway, fragment would be definitively the way to go.

Vincent

No answers yet.
Notifications