xpages categorized column - xpages

A lotus notes application is using a view with a column which is not categorized but is having the Show twsitie when row is expandalbe property check and it also is listing some documents.
Column formula:
#If (Form = "fmProiect";
"P: " + txt_Proiect;
Form = "fmDocCRM";
txt_Subiect;
"" )
I'm trying to achieve the same thing in a view panel - having the above view as Data Source Domino View.
I tried to add some icons for the expand/collapse property:
<xp:viewColumn columnName="$6" id="viewColumn3"
collapsedImage="/2.png" expandedImage="/1.png">
But still the column isn't categorized. Is there a way I can achieve this?

Add the attribute indentResponses="true" to your xp:viewColumn. Then response documents can by collapsed and expanded.
Note: As you described in your question, you have in Notes Client view the column not categorized but you can make visible or hide documents behind a document in view. Those documents are "response documents". They have an internal item "$REF" with the document id of the parent.

Related

How to add two related forms in a notes view?

Ok,I have a situation where I need to display a view that contains field value from two forms which is connected via a "CVNo" field. At first I thought it was simple and dived in. I added the form names in the view selection formula of the notes view and then created columns and assigned their respective values, but what happened was the output I got from doing so is a very jumbled and cluttered view. Based on my understanding the notes view displayed the column values from each form differently. I don't know how to do this or if this possible in notes view. All help and suggestions and are very appreciated.
In Lotus Notes view you cannot display documents connected to each other by a custom field. The only connection which can be displayed in Lotus Notes view is parent->response document hierarchy.
And please note that you do not create view that displays values from forms. You create view to display field values from documents, which are filtered to be shown in this view.
If you have documents, with field Form, one Form1 and another Form2, then create a view with selection formula:
SELECT Form = "Form1" | Form = "Form2"
Every row in the view represents a document (either with Form1 or Form2 value in the Form field).
And every column may contain a field name or #-formula to evaluate with every shown document to display a value in this column.

XPages newbie - view columns in discussion database

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.

Accessing the column headers from a view panel on an Xpage in Lotus Notes

Is there any way i can get the handle of View Column Header of a view panel on an Xpage?
I have a view panel.It has View Column Header and View Column in it.There is no programmatic way to get the handle of these.Any idea?
Let's say your view column header's ID is viewColumnHeader1, then you can get the handle of that column in SSJS using below command.
var columnHeader:com.ibm.xsp.component.xp.XspViewColumnHeader = getComponent("viewColumnHeader1");
But I would second with Simon McLoughlin, perhaps you can look into the Properties for View Column Header.

Count entries in XPages view

My XPage has a view data source with a search formula ("Search in view results") constructed from URL parameters.
The search results are displayed in a repeat control that sits inside a panel. I want to hide this panel if there are no search results and display an appropriate message instead.
The panel is visible based on the following code:
var vec:NotesViewEntryCollection = view1.getAllEntries();
vec.getCount() != 0;
However it seems that getAllEntries returns all entries in the view before the filtering takes place. The Help for AllEntries says "If a view is filtered by FTSearch, this property returns the entries in the filtered view."
Have I misunderstood this? Is there a way that I can get the number of entries AFTER the filtering has taken place?
When you're accessing the dominoView datasource via SSJS you're not getting the dominoView but the NotesView associated with it. That's why the properties and methods available are for the NotesView class. But the search is being performed on the dominoView datasource front-end not on the NotesView object associated with it.
Instead of using the datasource, get the control that uses it (e.g. A repeat, viewPanel etc) and use the getRowCount() method. This will give you the right total. E.g.
getComponent("repeat1").getRowCount()
Using the View caption property....
sample: "Displaying 30 of 30220"
<xp:this.caption><![CDATA[#{javascript:return "Displaying " + getComponent("viewPanel1").getRowCount() + " of " + view1.getAllEntries().getCount();}]]></xp:this.caption>
NOTE: This counts the categorized row as well.

How do you open a document from a categorized view in XPages?

Is there a trick to opening a document from a categorized view? I have several categorized views in an Xpage. In the View custom control of each I have the Show values in this column as links checked for the first column after the categorized column, but it doesn't seem to work. When I view the page the column values are not showing as links.
MJ
Have you set the "At runtime, open selected document using:" field on the view properties?

Resources