I read here MainUI pages and props that there is no way to use props for pages and that an alternative would be to use variables…
My use case is that I have multiple graph pages that are presenting the same set of info (in graphs) for different rooms…
I would like to “widgetize” the pages if there is a way to do this…
If you are trying to pass a variable value back and forth between custom widgets, however, there is a caveat. A widget called using something like: - component: widget:widget_simple can receive a variable value form the parent page, but changes that widget makes to the variable internally are not passed back up to the parent.
Depending on the details of how you are bringing up this page, though, defineVars may be unnecessary. If you are bringing up this page by clicking on a link in the OH side bar then you do have to define the variables in the page config. If you are always going to access this page by navigating from some other page then you don’t have to worry about defineVars and you just need to follow the example in the solution to the thread you linked passing information using the navigation action configurations.
Tahk you Justin for the patient explanation… I re-read the first discussion and I think I understand 1. that what I’m trying to do is possible and 2. that it might not be that complicated but I’m not able to get it to work…
Few questions : the target page for the navigation should be a page or a widget? If a page, and a chart page, I did not find the way to define the props…
Then, am I correct that if I use main UI to create the link (from a oh-list-item for example), and specify navigation to a page, the UI is supposed to somehow “read” the props and allow me to set them, right?
If yes, I think I’m stuck because of not being able to define the destination page properly…
Sorry if this is beginner’s question… I’ve looked at it together with AI buddies and was not able to find a way to configure props that would stick to the page definition…
Another question : I was under the impression that the example you were giving in the thread I linked in my first message was assocated to the usage of defineVars, and I thought you were saying that might not be necessary in my case (I don’t need the bidirectional value passing mechanism you mentioned).
Oh, tabs are a whole different problem. I’m think there might be a solution using defineVars in the page headers, but I’m not 100% sure. I’ve not tried anything like this with tabs. I’m reasonably certain there’s no way to make the navigation action trick work with tabs.