0
votes

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...)

1
Please check this answer here: stackoverflow.com/questions/10524850/…Sven Hasselbach
Thanks it is what i was looking for! Any ideas about the second question?mike_x_

1 Answers

3
votes

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.