How to collapse a dataView control by default? - xpages

I have a dataview control from the ExtLib and it is categorized. However the categories are expanded by default. How can I set this to collapsed?
I have seen code for the viewpanel control, but this does not apply to the dataview control.

Try setting the expandLevel property to 1 on the view data source:
<xp:dominoView ... expandLevel="1">

Related

Extending the "Files" menu

I have a process that involves extending the "Files" menu that is located on (most) acumatica pages (next to notes and activities in the top right)
I would like to add two columns to the table that appears in the smartpanel.
I have been looking for the source code/data behind this smart panel and I cant seem to find it, is it tied into SM202520 (search in files)? Can it be extended?
Am I better off just adding a PXAction button to the 3 or 4 pages I want my extended "files" menu to be?
Thanks
There's no DataView bound to that dialog, you can verify that by using inspect element shortcut key CTL+ALT+CLICK on a grid column header:
In order to be customized the grid needs to be bound to a DataView which inspect element reveals it is not. The lack of DataView binding is by design and therefore that dialog can't be customized.
A grid that can be customized will show the View Name property:

XPages DynamicViewPanel: expand categories by default

The Dynamic view panel control does not have the "ExpandLevel" property so how get the views displayed in that control expanded by default?
As usual, thanks for your input
There is an ExpandLevel property in the 'data' properties (All properties tab).
Data > data > expandLevel property:

xpages extension Library dialog read only

Can the xpages extension library dialog box (xe:dialog) be open so that it's fields are read only ?
Lotus Domino 8.5.3 version update 1 extlib
Thanks
If you make a panel control read only, the controls within the panel control are read only too. So, add your fields inside a panel control and make it read only:
<xp:panel readonly="true">
Add your fields here
</xp:panel>
The content of the dialog is defined by the structures declared within it, so you'd just make your elements within the content area computed text, or readonly fields, however you want to do it. If your question is can it be opened read-only sometimes, save a variable to the scope and use that to determine whether or not to render controls as editable.

XPages Open view and open XPage in edit mode

I've told a view to open using an XPage, but how do I open that XPage in edit mode?
I will suggest that you buy and read the Mastering XPages book to learn the basics of handling views and documents in XPages. The book contains material that describes exactly what you are looking for (how to open an XPage in read and edit mode).
I will assume your question relates to the XPage being used to open the selected document from the view and not the view itself as it is not possible to either define an XPage to to launch a view or for a view to be in "Edit Mode"...
When specifying the document data source for an XPage it is possible to define the default action as being Edit Document or Open Document. This sets the "action" property of the data source
The XPage itself has a "readonly" property that can be set to a specific value or computed. This is not tied to a specific data source.
It is possible to add a panel container control to the XPage and set the "readonly" property of the panel. This will allow all the controls inside the panel to be rendered as editable or readonly.
views and xpages cannot be in edit mode, only document data sources can be in edit mode.
In addition to the readonly properties that Peter mentioned:
It is possible that a custom control got its own data source while the one from a parent (e.g. the xpage) is in edit mode. That's the mistake i make often while binding controls to data fields.

Pager in one control, view in a different control?

I have a situation where I need to place a pager in one control and the view for that pager in a different control. I have the native pagers for the view turned off.
If I place a page in the same control as the viewer then it works fine but if I place the pager in one control and the view in another control and place them both on the same page, I get the error Pager is not associated with any data control. Any idea of how to accomplish this? Maybe I need to specify the control id that has the view along with the view associated with the pager?
You can associate pager with view panel manually using 'Attach to' property on pager (or just simply add/change tag 'for' into source which represent property 'Attach to'.
<xp:pager layout="Previous Group Next" xp:key="footerPager"
id="pager2" for="viewPanel1" >

Resources