A question to the Perspective Router implementation in smartUI SDK
Hi
I just finished a demo for a large US Gouvernement agency. The widget draws an event chart using D3 based on data from Connected Workspaces with several custom REST services.
Now I need to use a Backbone Router to intercept the URLs from the clicked D3 charts and to set the perspective accordingly (to avoid reloading the smartUI).
But I am a little bit lost in the smartUI implementation of Routers. I am quite familiar with Backbone Routing, but I need a short description, how to declare the node.perspective.router.js in my view and how to activate it in smartUI.
Or has this router to be added as CSUI extension?
(There is an example greeings.router.js in the sampels. Very clear and common. I am just missing an explanation, how to setup the router. In Backbone, its a simple addition to the main namespace)
Thanks for your Help.
Reiner
Answers
-
Let's find out if you need to implement a new router, or if you want to navigate using an existing one.
If you need to navigate to a URL recognised by CSUI or an existing extension, for example: /app. /app/nodes/:id, /app/search/.. etc., you don't need to implement a new router or even to learn about routers.
If you wrote a new page using a new widget and you need to open it on a new URL like /app/departments/:department, you will have to implement a new router for that route as a part of the job.
What is it? Or in other words, what are the URLs that you're going to navigate to?
0 -
Hi
this is more or less the standard node.perspective.js router application. I'll send you a core link with a short internal demo video (8 min) of the actual widget. This will explain a lot.The idea behind is to provide the user with the possibility to click on a D3 figure and to open the connected workspace associated with this.And, as of the scope in D3, within the link I do not have access to the context.getmodel and set("id",****) methods from within the D3 attribute set. Thats why a router is useful.
And the route to /app/nodes/:[oid] (if set as test in D3 circle) is not triggering the router in my widget.
Thats why I thought, I am missing some init or so.
Greetings
Reiner0 -
Hi,I have created a custom widget similar to myassignments and have similar expansion mode in my custom widget .Now when I try to clcik expansion mode in my custom widget I have to trigger my customized code but by default myassignments content server code is called.How we can find the routing path and change to our custom widgets path.0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories