Inside of a page view I've got some buttons. Within that same page, I have an embedded flex container.
I was attempting to update the contents of that flex container to a different page view.
I (clearly) haven't done a lot of design work in Ignition, and I initially assumed that I'd be able to do that using an onClick event, but I don't really see an action within that where I'd be able to specify a specific flex container & the page to bind to it.
At this point, I assume I'm probably approaching this in the incorrect fashion, but I'm hoping someone here can at least point me into the right direction so I can get this figured out.
Thanks in advance!
To understand,
Are you using an embedded view with a flex container in it or a flex container?
The image below has an embedded view selected and it is contained inside of a flex container.
Looks like I've currently got it set as a Flex Container, not as an embedded view.
Awesome that makes sense. So you want to have a subview inside of that flex container that can change when you choose a button?
Are these buttons for navigation for an HMI style bottom button nav situation?
That's correct on all fronts. I'm trying to make a subview inside a flex container that can be chosen by way of clicking on a button.
I'm not completely sure what you're asking in terms of HMI style bottom button nav situation though I suppose.
Here's a screenshot if it helps:
Two ways I would go:
1.) if you are going to have these buttons on every page on the bottom and top I would actually make them their own components and setup docked views under shared settings like the picture below. Then utilize perspective pages like the pic shows to setup pages. (See Inductive University)
You could then use an onActionPerformed event in the button to do a navigation action
2.) In the event you have other views to get to that will not use these buttons you can do something similar by using an embedded view component. Embedded view components take a path property that pulls up a view inside of it that can have parameters passed to it. You would then just need to use a scripting action to change a property to the path of the view you wish to use. I would recommend using a custom binding on the view and binding the path property on the embedded view to that custom view property (It keeps components from breaking their bindings if you move or rename something)
Button Script
Custom View Props
Binding Example on path prop.
Huge thanks here for the detailed reply!
This helps a ton.
I think your first option is probably the correct option in this case but I'm going to digest this for a bit & make sure I fully understand.
- On second thought, your second option is better suited because as you noted, this is embedded deeper into other page views that won't use these buttons.
I think I've got enough to do this now though. Appreciate all the help again & I'll go ahead and mark this as solved.
Always validate things from the forum!
If you have not gone through Inductive University, I would highly recommend it. It gives some good baseline information for you to use.
100% agree on Inductive University & it being a useful resource. I tried there this time around but honestly just couldn't figure out what exactly I was looking for so I greatly appreciate the pointers.
Unfortunately I don't often get a chance to dive this deep into the design work for Ignition so I typically find myself just using IU on more of an as needed basis rather than a start to finish approach.