Add second view to region
I would like to add a custom view just above the Table Of Contents / Home Panel / Results List part. I tried to add my view to the LeftPanelRegion, but I think that region can only have one active view, right? When I inspect the generated HTML code, I see that my view is there, but it is inactive.
Should I add a new region to the shell, and if so, how do I do that?
-
Hi Berend,
That sounds a bit like a job for a custom shell. I'll email you the shell HTML files. You should be able to use them to create a new shell view with the same view code and view models. No code changes should be required. Note that you'll need to set the "libraryId" property (omitted by default) on the new view to point at your library so the system knows where to find the new view markup.
-Jason
0 -
Thanks Jason,
That's exactly what I need, I think. Where do I have to put these files?
0 -
Hi Jason,
Thanks for these files, it sure looks promising, but I am afraid I need some more guidance.
What I did so far is:
Add the markup to my own module, I can see it’s registered in the compiled js file: geocortex.resourceManager.register("Grontmij.GeoWeb.Imby","inv","Modules/Imby/ImbyView.html","html","PGRpd……
Modify desktop.json.js: changed the ‘markup’ property of the ShellView view in the Shell module so it references "Modules/Imby/ImbyView.html", and added my libraryId to it (and added the library to the libraries section)But when I run the viewer, I get an error message: Unable to get value ‘className’ of undefined or null reference
I then added an empty view class to my module, and modified the “type” property of the view. Now the view runs, but it is completely empty. BTW I have no idea if this makes any sense at all J
0 -
Yes, it is found.
I dug around some more, and it seems that something is behaving differently when I run from Visual Studio, rather than load the viewer through IIS. In the latter case, it actually works!
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare