You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing email@example.com.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
4:24Docked Views in Perspective
4:47Docked View Properties
3:55Docked View Parameters
Take topic challenge
Docked View Parameters
When configuring a page, it is possible to pass a value to a docked view.
Video recorded using: Ignition 8.0
Transcript(open in window)
[00:00] In this lesson, we'll take a look at passing parameters to Docked Views. So we can see I have a page configured, and this page does have a Docked View. Now when I click on the Docked View and you look at its settings here, you can see that there is this View Parameters area. This basically allows you to specify one or more params properties on the View that's docked. So in this case looking at my View named WestDock. So if I have any params category properties on that View, this interface allows me to pass some value in when we navigate to the page. Now we do have some other videos that look at Views and params properties, but just to kind of show you what I have set up so far, if I switch over to this WestDock View I created, I have this Label component. This Label component has a binding on the text property, that's pointed to, if I look at the WestDock or the actual View object itself, there is this params category of properties. So I created this one property called display, and because of the property bindings I've configured, I'm able to type something in over here, and you see it appear on my component. And, again, the actual mechanism here for property bindings, that's something we talk about in another video. So we see this is working alright. So, again, what I want to do is that when we switch to my Page, I want to pass a value to that display property. So the way you configure that, we'll go back to the dock configuration, and under View parameters I'll add an object member, and I defined the display property as just a value member, so I'll click on value. And for the name of the key there you want to type in the exact same name you typed on the View. So in my case, it was display. And then specify what value do you want to pass in here. So how about we just start with something simple? How about just "one"? Let's hit okay, here. We'll save our project. And now let's launch a session. So real quick, we can just right-click on our Page, we'll launch the URL. So you can see our Page opened up, and it actually went ahead and provided the text "one" for our display parameter. So now because we have all the bindings and everything set up, we could always come on back to our Designer. I could just add another Page real quick. We'll go ahead and leave that Page URL alone for now. I'll specify the primary View. We'll add our dock. I'm using that West Dock View I just showed you. We'll hit okay again. We'll come back up to the configuration on that dock, and let's add another value parameter. So, again, we'll pick value. This will be display, again, and this time we'll pass in something different about just the string "two"? So if we hit okay, and, again, we'll save our project because we added this new Page here. And when we try to launch this Page, so we'll right-click on it, we'll launch the URL, and get my session coming back up, we'll get a new tab, and it's showing you different text because of the page I'm on here. Now as a quick word on using these parameters with these Docked Views, if we head back to the configuration, we can see that the View parameters don't really have any sort of interface that allows you to create a binding, or otherwise make this value indirect. If you're trying to change the value on these Docked Views and these Pages in some way, you probably want to take a different approach. Maybe creating session props and then changing their values via script, or something to that effect.