We have created the first "live" app using Volt - with security to determine when/who can show what....
One thing that we would like is to open another than the first view tab for a specific group of users. Not the url to create a new document - but a url to open the second view tab....
I want some of the users to start on "Dagsrapport". Can this be done? I haven't found any setup/config - but perhaps some "query open" code?
Hi John - there is a function:
item.setSelectedTab(tabTitle)
that takes the string value of the tab and sets that to active. You can get the list from:
item.getTabTitleList()
More can be found in Table 13 here: https://help.hcl-software.com/domino_volt/1.0.2/ref_jsapi_user_interface_objects.html
Well, that looks like what I need. However, where do I add that code?? item normally refers to a "field" - but that doesn't really make sense here.
So I would expect that I should call the code in what is the "view" object (and not "form" object) of the first form shown - or rather the "parent" of that view which holds all the views ("tabs") for the various forms.
Can you help me with a little more details? I couldn't find it in the docs.
Btw, there's a small glitch in the docs in "Table 5":
I guess that should be "Table 13" :-)
You should be able to call it from any action (i.e. a button click, or onChange, etc) So, in your example you could tie it to the onShow of the tab element or the onChange of the "role" field that you're setting - so that when the user's role is changed it will select the appropriate tab
Hmmm... Actually, I want to call it when the user logs in - so the users having a specific role are presented with the second tab instead... So I don't really have an "item" as such at that time... I don't even have a document or a form open - just the standard view panel...
When the user logs in, where are you getting their role? Are you setting that value at login? You could always do it on the onShow of the Tab component itself?
Sorry, I've just been back and forth with this and a lot of other things - so have not had the chance to give you a proper answer.
Roles:
The roles we define in the application - and apply them to groups set up in the directory.
I have tried to find a way to tell what role a given user has (like @UserRoles() in "normal" Notes/Domino). But you're right - I haven't found a way to get that information - which I would need to tell which tab to open (and if possible hide others that are not relevant...)
Tabs:
I have tried all sorts of different "tricks" to see how I could get the "children" of the application - giving me the tabs. I need them to be able to set the selected tab like you suggest.
item.setSelectedTab(tabTitle)
... but what is "item" from the example???? I can put code in the `Application onStart` or in one the form's events...??? Anything I have tried in the Application event did not work - and the forms are not the contexts I need as I need the initial view prior to opening any form....