Reputation: 157
I am trying to present a categorized view in a Lotus Domino XPage with all categories collapsed initially. I have successfully used page.xsp?expandLevel=1 in the URL, as well as setting the property ExpandLevel to 1 in the view panel.
The problem is, when I click on any category to expand it, it does not open on the first click. Instead, it turns the twistie as though the category was expanded, but displays nothing. If I click again, it closes the twistie. If I click a third time, it correctly opens the category.
This behavior is consistent, I have tried it on several views, and tried opening several categories. I have tried Chrome and IE. Am I the only one to see this, or just the only one who cares?
I am using the latest code, 8.5.3FP3
Anyone know a work-around or other method of doing this?
Upvotes: 2
Views: 3975
Reputation: 9945
It seems to be a clear bug in 8.5.3 with expandLevel=1 and as @John said is really easy to reproduce. I had to use this function (similar to @bj but without xp:dominoView):
function collapseExpandAll(id, bColapse){
var viewPanel = getComponent(id);
var model:com.ibm.xsp.model.domino.DominoViewDataModel = viewPanel.getDataModel();
var container:com.ibm.xsp.model.domino.DominoViewDataContainer = model.getDominoViewDataContainer();
if(true === bColapse){
container.collapseAll();
}else{
container.expandAll()
}
}
and call
collapseExpandAll("viewPanel1", true)
to collapse all and
colapseExpandAll("viewPanel1", false)
to expand all.
Upvotes: 1
Reputation: 31
I have been experiencing the same problem. I seem to only see the problem the first time I click on the category to expand - I would have to click it twice. Subsequent clicking on a category will work as long as the page with the view panel remains open. Based on my particular experience, this is the work-around I have come up with:
I continue to use the expandLevel="1"
in the view panel.
<xp:dominoView var="vwSecurityType" viewName="bySecurityType" expandLevel="1">
</xp:dominoView>
In the "after page load" event, I add this code:
var viewPanel = getComponent("viewPanel1");
var model:com.ibm.xsp.model.domino.DominoViewDataModel = viewPanel.getDataModel();
var container:com.ibm.xsp.model.domino.DominoViewDataContainer = model.getDominoViewDataContainer();
container.expand("0");
I hope this helps you as well.
Upvotes: 3
Reputation: 587
This isn't something that has been reported to the code XPages Dev team as an issue before.
However without seeing what your underlying view data sources look like I'm guessing that you have multiple subcategories and\or responses to responses in the View. Here you might see a problem or better described a delay in the view refreshing after expanding one row of a view where you have all rows collapsed - expandLevel=1
This is something that has been addressed in 9.0 (though not in the Beta) and you should see a huge improvement in this area.
That is of course if it is what the underlying behaviour you are seeing.
Upvotes: 1