XPages newbie - view columns in discussion database - xpages

I'm a traditional domino developer just beginning XPages. I'm working on modifying the standard 8.5.3 Domino discussion database. I've added some fields on the Main Topic and response forms, one called category. I've added a categorised column in the ($xpAllDocuments) view to the left of "Topic" for the category field. This works fine in Notes as you'd expect, but when the view is rendered in the All Documents xpage, the category twiste displays without any label. I'm not sure how to modify the column data for the xpage, as it seems to use a repeat? instead of a view?
Any help greatly appreciated, and apologies for the presumably basic enquiry!

You have to add the categories column to custom control allDocumentsView which renders the view for browser.
How to find out where to set the new categorized column? A good way is to look at the "All properties" of a certain element. For that, open the Source pane of custom control allDocumentsView, position cursor on <xe:dataView and look at "All Properties". If you hover over the properties' labels you get a helper window with a short explanation.
In your case, property categoryColumn is what you are looking for. Assuming you added a categorized column Categories to view ($xpAllDocuments) then you would have to put into property categoryColumn:
With that, your source code gets expanded by
<xe:this.categoryColumn>
<xe:viewCategoryColumn
columnName="Categories"
columnTitle="Categories">
</xe:viewCategoryColumn>
</xe:this.categoryColumn>
and you will see the added categorized column in your rendered XPage.

I don't know the discussion template in detail, but when the All Documents Xpage is using a repeat control, then you cannot expect an automatic category expand/collapse feature as in a Notes view.
If you want that, you need a View control on the Xpage.

Related

How to fix drop-down responses document in lotus notes

Basically, I'm using version tracking to list down all edited document. When I see on notes, it's not created as a drop down and it just shows all record.
For example like this website. Provide by #umeli. But I can't seem to get it inside my lotus notes.
Like below this. I have this view inside my lotus notes. It just shows everything.
This is list inside my browser. It has like drop-down when I click, it will show all.
Like this. When I click, it will show all the history of the edited document.
Any advice that I can create a drop-down like in-browser inside my notes? Any help will be appreciated. Thanks!
Use Domino Designer to edit the No column. You need to select the "Show twistie ..." setting as described here.
Also, you may want to automatically collapse the view entries when the user opens the database. To do that, edit the view properties and select "Collapse all when database is first opened".

Want to create an column in Dynamic View Panel that displays "Favorites" icon

I am using a Dynamic View Panel and would like to create a "Favorites" column in the view. The underlying view has a "Favorites" multivalue names field that contains all users that have flagged the document as a favorite. What I would like to do is to handle this conversion in a "Customizer" bean where I can compare the current user with the stored vales in the "Favorites" column and see if they are in the list. If they are I would present a "Green Star" icon (not a standard Notes icon) else I would present an empty star icon. I would also like to make the star icon live so if you click on the star it would toggle the favorite value in the database on/off.
How do I implement such a feature?
What are the DominoViewCustomizer methods I need to override? (looking at afterCreateColumn)
How do I get and set the column values? (really lost here)
How do I get the column to display a Notes resource image (my stars) or do I need to store it in a directory on server?
How do I make the star icon clickable?
How do I capture that click event?
Using Domino v9.0.1
If you don't have to use a dynamic view panel here's a way of doing it that will work with a view panel, repeat, or data table...
Use a "favorites" document for each user. Have it contain one multi-value item to store the Note IDs of all the documents the user favorited.
When the user logs on read the contents of the multi-value field into a sessionScope variable. Then in your view column all you need to do is check if the NoteID of the current row is in your sessionScope variable and display the appropriate icon.
For the part when a user clicks on a star you would have an event handler on that column that does a lookup to the user's favorites document (create it if it doesn't exist) and add or remove the NoteID then do a partial refresh on the view.
You can probably still do this with a dynamic view panel but I can't speak to the particulars of it since I don't use it much.

Lotus xpages: xpage containing multiple views

I have a xpage which contains one big table with 1 row and 2 columns. I created this table to separate the xpage into 2 parts: the left one where I have some buttons and the right one where I want to display some views.
From the container controls I drag a View on the right column, but is there any chance to do this in such a way that 1st button clicked => 1st view is shown, 2nd button clicked => 2nd view is shown and so on.
Or every xpage should contain one view?
I raise this question considering the fact that in Lotus Notes if you had one frameset with 2 frames, you could easily create an outline in one frame, and some views that will be open by every outline entry in the 2nd frame. What I want to do is quite the same thing.
I appreciate your time. If you think this question isn't 'good' enough, I will just delete it. I'm new in XPages development.
Use simple table with one row and two columns. Place your buttons inside the left cell. Put the switch control (mentioned by Tim) to the right one.
More about the control in extlib demo DB... online demo here
Create separate custom control for each view and drag and drop "Include Page" from container control to the right column of your table and compute the page name instead of selecting an XPage. You can compute like this sessionScope.CCName + ".xsp". And onclick of the button set appropriate custom control(which contains the view) name as the value to the sessionScope variable and reload the page. This will do what you want. I hope this too helps.
You could do this on a single XPage using a xe:navigator control in the left column and an xe:dynamicViewPanel control in the right. These controls are available in the Extension Library if you are running 8.5.3 and natively available in release 9.
The Dynamic View Panel control is the dynamic content control for displaying one of several Domino views. Only the component for the displayed view is loaded in the component tree so it is highly efficient compared to alternative designs (like an xp:viewPanel control in each facet of an xe:switchFacet control as each viewPanel is loaded in the component tree on the server, not just the one that is rendered).
See this online demo http://xpages.jp/demos/xpagesext.nsf/Domino_DynamicView.xsp
put each content on a seperate panel in a custom control.
Have those custom controls in seperate divs and show/hide divs based on button click.
If you are using different xpages, you can use IncludePage(from container controls), which will act like a computed subform.

Sharepoint Custom List Preview Pane not displaying information past Title and Date

My preview pane has all the items down the left side as it should, and it has all of my column selections as rows down the right side.
However, when hovering over the titles, only Date and Title are being filled out on the right side.
If I change the view style to boxed or anything then it displays all the information.
It just appears that preview pane is having some weird difficulty correlating the hovered over item to the information on the right, Any suggestions?
Using Sharepoint 2013. I don't have Sharepoint Designer though. There's roughly 15 columns of information that needs to be displayed in rows because there's not enough room along the columns bar otherwise. Boxed style worked for a moment but then I realized there was no way to make it 1 box wide instead of default 2 boxes wide.
EDIT: I created a calendar view to add onto my page and chose to display Title. This might be where the problem is coming from. It says the title of all of my items are (no title).
I figured out that in InfoPath in the Fields pane on the right, you have to go to 'Show Advanced View'. Then there is a group called queryFields. The title inside queryFields was never being injected with same information as dataField. I saw later in the view option that my sort by setting was [Title]. I don't know if it's relevant, but putting it out there for future readers.
Solution: If you have an email user/group field that is not completed, it will not display any details beyond that field for each record. Either remove that email column, or ensure they are filled out.

How to clear any column sorting in PickList

Does any of you know how to clear any column sorting before opening a view in a picklist?
I have a view with columns that can be sorted if they are clicked.
The information about the view is now sorted by a column is kept.
If I change away from the view and click on my button which includes a picklist that shows the view. Then the column sorting is remembered.
How can clear any column sorting in the view?
I have tried the method resortview but can’t get that to work.
I think you can disable this in your Notes Preferences.
Choose from menu File - Preferences - Basic Notes Client Configuration and disable the option "Retain View column sorting"
Caution: This setting affects any Lotus Notes Database, it is a global setting for your Notes client.

Resources