I have a Perspective view where I need to provide users the ability to select an individual Widget and trigger a popup with information relevant to that selected object. Is there a way to create a selected parameter within the Widget? (Yellow Highlight) Or is there a way to create an ON CLICK event for a widget when the dashboard is being edited.
A good example of what I am hoping to find or have is when you select a row/column of a perspective table you can use/see the selected information. I am hoping to create something similar to this that will allow me to either use Bindings or events to generate a popup to displayed detailed information of the "Bay" selected:
Or am I barking up the wrong tree and there's a better way to achieve what I hope to do here?
Any and all engagement is appreciated!
Configure the embedded view to have an onClick
script that opens the popup with needed information. Have a param like enablePopup
that your script checks to allow you to enable/disable showing popups when the widget is clicked.
Alternatively, configure the embedded view to have a context menu that has an option for opening the popup.
Since both of these has the embedded view opening the popup, it has all the info it needs to pass to the popup.
1 Like
Thanks!
but I must still be missing a step here. I did get everything to work as shown here:
Widget is selected, but not editing (Blue outline) and popup does not launch.
When editing the widget (Orange outline) now the popup launches.
My hope is to eliminate the 2 button clicks but mainly remove the need to hit the edit GUI icon because you cant see it on half the widgets in use. I understand the enablePopup parameter you suggested, but I still dont see anyway to tie anything to when the individual widget is selected. When I attempt to setup an on click event is applies to the dashboard window as a whole not on components within. I feel like its going to be something obvious but I am not seeing it.
Thanks,
How about adding a "Dashboard edit" toggle switch to your view.
Bind the dashboard's editingToggle
to that.
You probably also need to turn of isEditing
when the slider is switched off. I'd do this with a message handler from the toggle's event back to the dashboard.
I haven't tried it so I don't know what other issues might arise.
1 Like
Sorry I should have been more concise. by default when the page is loaded I already have the isEditing set to on. The edit button on the widget is what must be clicked to enable the popup as shown here:
now its been clicked and the border goes orange:
Doesn't this imply there's a parameter that becomes true when the widget is selected? From there the rest of what I am looking to do is easy.
Here is the property table when I have the widget selected and I am editing the individual widget. IE when the popup works.
Thansk,
Sure, has to be. In the browser. Not necessarily in the gateway where a script would be able to see it.
1 Like
Fair enough sounds like this is as good as I am gonna get then.
Thanks for all the assistance!
Sorry I am really stupid...
Not sure what is happening within the actual dashboard and widget code, but the selected solution works as I was intending if the dashboard is not in edit mode. The reason I didn't try that before was because I didn't think the dashboard would know what specific widget I was selecting when not in edit mode. But that obviously appears to not be the case because I can click on the individual bay areas and get the correct popup information.
thanks everyone
3 Likes