onClick event inside component

#1

Hi,

I am currently working on Ignition V8.0.4. I have 60 components on a page that need a relative tooltip event which will display their name. Initially I went inside on the component where I created it (in views) and configured an onClick Event having a pop-up looking and meta/name. In fact the title has the following path “” {/root.meta.name}"" . It seems that it isnt working as I would expect when I go back on the page every single component should of had this event firstly. Secondly it doesnt actually display the name I have assigned on “meta/name” of the component on the page but it only shows “root”. Any ideas would be much appreciated.

Many Thanks
Alex

0 Likes

Upgraded crashed components
#2

Could you provide the View you’re describing?
A picture is worth a thousand words, but a json is worth a million words.

1 Like

#3

image

image

0 Likes

#4

It also looks like all the embedded views I have assigned on my “Overview Page” are not updating when I assign a new parameter on their root automatically which means I need to re-drag the view and reconstruct the whole page if that makes sense.

0 Likes

#5

That Popup looks 100% like I would expect it to, provided the configuration you’re showing.

{/root.meta.name} will be interpolated as "Get the name property from the meta category of the root component. So assuming your root node/component has meta.name = “root” this is absolutely correct.

Params are defined on the View node, not the root node. Regardless, the Embedded View should be updating as you update the View being used. We can easily check if this is working. Place a Label into the View you are trying to embed, and make the text color something other than black so that you can easily see it. Save the project. Now look at a location where the View has been embedded. If you do not see the Label, then there is something to investigate.

1 Like

#6

Thanks for your reply. The issue is that by configuring “root/meta/name” on the view page , the configured view that exists on my overview page as an embedded view at about 60 times, is looking on the name that the view has on the view page and not as I name it on my overview page where it exists as an embedded view.

So for instance when I rename this embedded view(motor) on my overview page that exists at about 60 times the tooltip event displays “root” which is the name it has on the original view configured where my goal is to display the name I give it for instance motor 1) on the overview page with main goal simply rename all 60 motors that exist as embedded views on my overview page and not configure the tooltip event 60 times individually if that makes sense. Currently all motors are displaying “root” instead of the name I give them on the overview page.

Also it seems that the new parameter I’m setting on the same view does not update on the embedded view in my overview page but only if I drag the view on my overview page as a new component.

0 Likes

#7

Because you’re naming the Embedded View component, not the View it represents/contains/displays.
EmbeddedView.meta.name != ViewUsedInEmbeddedView.meta.name

If you want to “name” each of your instances, you should pass such a value as a parameter to the EmbeddedView (or FlexRepeater if you’re doing more than a couple).
09%20AM
Then, prepare your View to receive the new param (this is on the View node, not the root node or any of the components):
41%20AM

Finally, configure the Popup to reference that value when opened and use the value foe the title:
21%20AM

You’ve made this claim several times in a couple of threads, and I’ve provided an avenue for testing the claim, but I haven’t seen any responses where you’ve attempted my prescribed steps. Please try placing an easily visible component in the View you’re embedding, and then save the project. If the new component is displayed in the embedded/instanced View, then there is probably an issue in how you’re using the parameters. If the new component is NOT visible, then there is cause for concern, and you should provide some screenshots as well as the json for the Views in question.

0 Likes

#8

Hi,

Thanks for your reply.

The question is : if I configure a Mouse-enter Event to display tool-tips, on the root of view1 ,will then be possible to display tool-tips on a different view(viewpage) where view1 is added as an Embeddedview ? If this is wrong is there another way to configure in view1 so I only have to rename each instance of view1 used on viewpage?

I have tried adding a new parameter(name) on the view of view1, which I could bind it to look on the name of every view1 instance on my viewpage but this is probably even more timing consuming.The issue is that when I go on the viewpage where view1 exists a number of times already, it doesnt seem to be updating the new parameter on any of the instances,unless I re-embed view1 on the viewpage only.

Following your suggestion I did add a label on view1 and that worked perfectly, as I could see the label on every embedded-view1 instances I have on myviewpage.

Ive been getting this error when I save the project which I am currently unsure if it is related:

Here is a copy o f the json file currently working at:view.json (3.5 KB)
resource.json (357 Bytes)

0 Likes