I have a categorized view and i show it in my Xpage by using the view panel control.
Is it possible whenever the page loads (first load or after page refresh) the view panel to be collapsed by default?
And after that, can i check programatically if any row is expanded or collapsed? (so as to hide or show another field for example...)
You can check if a row is expanded or collapsed with this little SSJS snippet:
function isRowExpanded( rowIndex ){
var panel = getComponent("viewPanel1");
var dvdm = panel.getDataModel();
dvdm.setRowIndex(rowIndex);
return dvdm.isRowExpanded()
}
The index of the row starts with 0. The index depends on the rows displayed in the view panel.