I have V14SP2 Page containing a ViewContainer containing currently two views
CourseView & CentreView
When the user selects a course (by touching) on the Courseview I want to switch to the CentreView to list Centres for that course. I know I could add a function in a global scoped RP that the webpage listened to to tell it to switch to the Centreview but I was wondering if there is some new facility in this new world that lets a view communicate back with its viewcontainer in a more direct way.
Cheers
Jim
VL Web Material Design
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: VL Web Material Design
Hi,
No, nothing new. The paradigm is still the same.
I usually just signal events from Views, in your case something like
Since the main Web Page has a reference to all the Views, it is the perfect place to handle View-Events and decide on navigation.
It also keeps the View itself loosely coupled, you could potentially drag it into another application and it could be re-used.
But you might want to ask yourself if you're not better of presenting the "Centres for that course"-data in a (possibly full-screen) Dialog. If the user is zooming in on a bit of information that's generally the better choice.
The user can then simply dismiss the dialog and they're back where they left from...
That code can be as simple as...
Hope this helps
,
Danny
No, nothing new. The paradigm is still the same.
I usually just signal events from Views, in your case something like
Code: Select all
Signal Event(CourseSelected) CourseId( ... )It also keeps the View itself loosely coupled, you could potentially drag it into another application and it could be re-used.
But you might want to ask yourself if you're not better of presenting the "Centres for that course"-data in a (possibly full-screen) Dialog. If the user is zooming in on a bit of information that's generally the better choice.
The user can then simply dismiss the dialog and they're back where they left from...
That code can be as simple as...
Code: Select all
Evtroutine Handling(#CourseList.ItemClick)
Define_Com Class(#CourseCentresDialog) Name(#Dialog)
#Dialog.ShowCourse CourseId(...)
Endroutine
Danny
Re: VL Web Material Design
Thanks Danny. There's a lot to learn but its so much easier and it looks fantastic. We are really going to delight our users!